Browse Source

Change getDefaultUserDataPath to const

George King 6 months ago
parent
commit
5b5b2f158d
1 changed files with 4 additions and 1 deletions
  1. 4 1
      lib/VCMIDirs.cpp

+ 4 - 1
lib/VCMIDirs.cpp

@@ -99,7 +99,10 @@ class VCMIDirsWIN32 final : public IVCMIDirs
 
 
 	protected:
 	protected:
 		std::unique_ptr<JsonNode> dirsConfig;
 		std::unique_ptr<JsonNode> dirsConfig;
+
 		bfs::path getPathFromConfigOrDefault(const std::string& key, const std::function<bfs::path()>& fallbackFunc) const;
 		bfs::path getPathFromConfigOrDefault(const std::string& key, const std::function<bfs::path()>& fallbackFunc) const;
+		bfs::path getDefaultUserDataPath() const;
+
 		std::wstring utf8ToWstring(const std::string& str) const;
 		std::wstring utf8ToWstring(const std::string& str) const;
 		std::string pathToUtf8(const bfs::path& path) const;
 		std::string pathToUtf8(const bfs::path& path) const;
 };
 };
@@ -160,7 +163,7 @@ bfs::path VCMIDirsWIN32::getPathFromConfigOrDefault(const std::string& key, cons
 		return bfs::path(raw);
 		return bfs::path(raw);
 }
 }
 
 
-static bfs::path getDefaultUserDataPath()
+bfs::path VCMIDirsWIN32::getDefaultUserDataPath() const
 {
 {
 	wchar_t profileDir[MAX_PATH];
 	wchar_t profileDir[MAX_PATH];
 	if (SHGetSpecialFolderPathW(nullptr, profileDir, CSIDL_MYDOCUMENTS, FALSE) != FALSE)
 	if (SHGetSpecialFolderPathW(nullptr, profileDir, CSIDL_MYDOCUMENTS, FALSE) != FALSE)