Drop texture file list cache (#6660)
authorVitaliy <silverunicorn2011@yandex.ru>
Sat, 10 Mar 2018 18:33:37 +0000 (21:33 +0300)
committerSmallJoker <SmallJoker@users.noreply.github.com>
Sat, 10 Mar 2018 18:33:37 +0000 (19:33 +0100)
src/client/tile.cpp
src/client/tile.h

index 91a3c0a3853352a70af93ec93a4b0a10489fecab..a88163a50bf4afaf1bc0d17aeae7bce19f2c8983 100644 (file)
@@ -2390,9 +2390,7 @@ video::ITexture *TextureSource::getShaderFlagsTexture(bool normalmap_present)
 
 }
 
-const std::vector<std::string> &getTextureDirs()
+std::vector<std::string> getTextureDirs()
 {
-       static thread_local std::vector<std::string> dirs =
-               fs::GetRecursiveDirs(g_settings->get("texture_path"));
-       return dirs;
+       return fs::GetRecursiveDirs(g_settings->get("texture_path"));
 }
index 6436a93d3501d60700fc968624f633ee973a1ac2..c21594206692fdaacd0a5682a49ee1a8b8476476 100644 (file)
@@ -339,4 +339,4 @@ struct TileSpec
        TileLayer layers[MAX_TILE_LAYERS];
 };
 
-const std::vector<std::string> &getTextureDirs();
+std::vector<std::string> getTextureDirs();