Skip to content
Snippets Groups Projects
Unverified Commit 04f7a703 authored by bunnei's avatar bunnei Committed by GitHub
Browse files

Merge pull request #705 from lioncash/string-ref

file_util: return string by const reference for GetExeDirectory()
parents cbf43225 63e64f01
No related branches found
No related tags found
No related merge requests found
...@@ -592,7 +592,7 @@ std::string GetBundleDirectory() { ...@@ -592,7 +592,7 @@ std::string GetBundleDirectory() {
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
std::string& GetExeDirectory() { const std::string& GetExeDirectory() {
static std::string exe_path; static std::string exe_path;
if (exe_path.empty()) { if (exe_path.empty()) {
wchar_t wchar_exe_path[2048]; wchar_t wchar_exe_path[2048];
......
...@@ -133,7 +133,7 @@ std::string GetBundleDirectory(); ...@@ -133,7 +133,7 @@ std::string GetBundleDirectory();
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
std::string& GetExeDirectory(); const std::string& GetExeDirectory();
std::string AppDataRoamingDirectory(); std::string AppDataRoamingDirectory();
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment