From 1d9f543eb81007256648fd7867d35fea1b10ac7e Mon Sep 17 00:00:00 2001 From: Nomango <569629550@qq.com> Date: Tue, 3 Jul 2018 01:52:11 +0800 Subject: [PATCH] =?UTF-8?q?Path=E7=B1=BB=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/Common/Image.cpp | 2 +- core/Tool/Music.cpp | 2 +- core/Tool/Path.cpp | 4 ++-- core/e2dtool.h | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/Common/Image.cpp b/core/Common/Image.cpp index acbb32f3..0b8c50b3 100644 --- a/core/Common/Image.cpp +++ b/core/Common/Image.cpp @@ -161,7 +161,7 @@ bool e2d::Image::preload(const String& filePath) return true; } - String actualFilePath = Path::searchForFile(filePath); + String actualFilePath = Path::findFile(filePath); if (actualFilePath.isEmpty()) { return false; diff --git a/core/Tool/Music.cpp b/core/Tool/Music.cpp index e57d581a..531a2da5 100644 --- a/core/Tool/Music.cpp +++ b/core/Tool/Music.cpp @@ -85,7 +85,7 @@ bool e2d::Music::open(const e2d::String& filePath) return false; } - String actualFilePath = Path::searchForFile(filePath); + String actualFilePath = Path::findFile(filePath); if (actualFilePath.isEmpty()) { WARN("MusicInfo::open File not found."); diff --git a/core/Tool/Path.cpp b/core/Tool/Path.cpp index 8bbf9372..79983219 100644 --- a/core/Tool/Path.cpp +++ b/core/Tool/Path.cpp @@ -69,7 +69,7 @@ void e2d::Path::setGameFolderName(const String & name) } } -void e2d::Path::add(String path) +void e2d::Path::addSearchPath(String path) { path.replace(L"/", L"\\"); if (path[path.getLength() - 1] != L'\\') @@ -98,7 +98,7 @@ e2d::String e2d::Path::getExecutableFilePath() return std::move(String()); } -e2d::String e2d::Path::searchForFile(const String& path) +e2d::String e2d::Path::findFile(const String& path) { if (Path::exists(path)) { diff --git a/core/e2dtool.h b/core/e2dtool.h index ec819294..8dc02bce 100644 --- a/core/e2dtool.h +++ b/core/e2dtool.h @@ -447,13 +447,13 @@ public: const String& name ); - // 添加搜索路径 - static void add( + // 添加资源搜索路径 + static void addSearchPath( String path ); // 检索文件路径 - static String searchForFile( + static String findFile( const String& path );