From 43cc814ffc5cdbc255695615af6e79052b6b6c39 Mon Sep 17 00:00:00 2001 From: tkzcfc Date: Fri, 30 Sep 2022 14:40:52 +0800 Subject: [PATCH] Add macro definition AX_NO_DUP_SEARCH_PATH (#874) --- core/platform/CCFileUtils.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/platform/CCFileUtils.cpp b/core/platform/CCFileUtils.cpp index bc5fa393f4..24a7c101f0 100644 --- a/core/platform/CCFileUtils.cpp +++ b/core/platform/CCFileUtils.cpp @@ -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) {