mirror of https://github.com/axmolengine/axmol.git
Add macro definition AX_NO_DUP_SEARCH_PATH (#874)
This commit is contained in:
parent
1263d05b76
commit
43cc814ffc
|
@ -928,6 +928,7 @@ void FileUtils::addSearchPath(std::string_view searchpath, const bool front)
|
|||
path += "/";
|
||||
}
|
||||
|
||||
#ifdef AX_NO_DUP_SEARCH_PATH
|
||||
auto it = std::find(_searchPathArray.begin(), _searchPathArray.end(), path);
|
||||
if (it != _searchPathArray.end())
|
||||
{
|
||||
|
@ -939,6 +940,7 @@ void FileUtils::addSearchPath(std::string_view searchpath, const bool front)
|
|||
_originalSearchPaths.erase(itOrigin);
|
||||
}
|
||||
}
|
||||
#endif // AX_NO_DUP_SEARCH_PATH
|
||||
|
||||
if (front)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue