aboutsummaryrefslogtreecommitdiff
path: root/src/common/file_util.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-07-19 01:27:27 -0400
committerLioncash <mathew1800@gmail.com>2018-07-19 01:27:29 -0400
commitba015f825f55d71d527c0eab8fea073266f3a5b0 (patch)
tree763ffc8992522e3c725aea4536f9b7f861914b3f /src/common/file_util.cpp
parent25c34badfaeb2daffe9235c4e547ed461531da7e (diff)
file_util: return string by const reference for GetExeDirectory()
This disallows modifying the internal string buffer (which shouldn't be modified anyhow).
Diffstat (limited to 'src/common/file_util.cpp')
-rw-r--r--src/common/file_util.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index bf955386ce..c882ab39f5 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -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];