Browse Source
Merge pull request #705 from lioncash/string-ref
file_util: return string by const reference for GetExeDirectory()
pull/15/merge
bunnei
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
2 deletions
-
src/common/file_util.cpp
-
src/common/file_util.h
|
|
|
@ -592,7 +592,7 @@ std::string GetBundleDirectory() { |
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
std::string& GetExeDirectory() { |
|
|
|
const std::string& GetExeDirectory() { |
|
|
|
static std::string exe_path; |
|
|
|
if (exe_path.empty()) { |
|
|
|
wchar_t wchar_exe_path[2048]; |
|
|
|
|
|
|
|
@ -133,7 +133,7 @@ std::string GetBundleDirectory(); |
|
|
|
#endif |
|
|
|
|
|
|
|
#ifdef _WIN32 |
|
|
|
std::string& GetExeDirectory(); |
|
|
|
const std::string& GetExeDirectory(); |
|
|
|
std::string AppDataRoamingDirectory(); |
|
|
|
#endif |
|
|
|
|
|
|
|
|