16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 03:09:18 +02:00

refactor: create paths namespace instead of global variables

This commit is contained in:
jerrrrycho
2026-03-15 11:55:30 +01:00
parent 383788b30a
commit 9f43dca48b
20 changed files with 112 additions and 100 deletions

View File

@@ -125,7 +125,7 @@ TModelsManager::find_in_databank( std::string const &Name ) {
std::vector<std::string> filenames {
Name,
szModelPath + Name };
paths::models + Name };
for( auto const &filename : filenames ) {
auto const lookup { m_modelsmap.find( filename ) };
@@ -146,7 +146,7 @@ TModelsManager::find_on_disk( std::string const &Name ) {
auto lookup = (
FileExists( Name + extension ) ? Name :
FileExists( szModelPath + Name + extension ) ? szModelPath + Name :
FileExists( paths::models + Name + extension ) ? paths::models + Name :
"" );
if( false == lookup.empty() ) {
return lookup;