diff --git a/src/backend/helpers.cpp b/src/backend/helpers.cpp index 4283f239..3d71a536 100644 --- a/src/backend/helpers.cpp +++ b/src/backend/helpers.cpp @@ -195,10 +195,8 @@ namespace loot { else return ""; } -#endif boost::filesystem::path GetLocalAppDataPath() { -#ifdef _WIN32 HWND owner = 0; TCHAR path[MAX_PATH]; @@ -209,14 +207,12 @@ namespace loot { return fs::path(path); else return fs::path(""); -#endif } //Turns an absolute filesystem path into a valid file:// URL. std::string ToFileURL(const fs::path& file) { BOOST_LOG_TRIVIAL(trace) << "Converting file path " << file << " to a URL."; -#ifdef _WIN32 wstring wstr(MAX_PATH, 0); DWORD len = MAX_PATH; UrlCreateFromPath(ToWinWide(file.string()).c_str(), &wstr[0], &len, NULL); @@ -224,10 +220,8 @@ namespace loot { BOOST_LOG_TRIVIAL(trace) << "Converted to: " << str; return str; -#endif } -#ifdef _WIN32 //Helper to turn UTF8 strings into strings that can be used by WinAPI. std::wstring ToWinWide(const std::string& str) { int len = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), str.length(), 0, 0); diff --git a/src/backend/helpers.h b/src/backend/helpers.h index 6c7130ee..feae3c77 100644 --- a/src/backend/helpers.h +++ b/src/backend/helpers.h @@ -53,7 +53,6 @@ namespace loot { #ifdef _WIN32 //Get registry subkey value string. std::string RegKeyStringValue(const std::string& keyStr, const std::string& subkey, const std::string& value); -#endif //Get the local application data path, within which LOOT's data folder should be stored. boost::filesystem::path GetLocalAppDataPath(); @@ -61,7 +60,6 @@ namespace loot { //Turns an absolute filesystem path into a valid file:// URL. std::string ToFileURL(const boost::filesystem::path& file); -#ifdef _WIN32 //Helper to turn UTF8 strings into strings that can be used by WinAPI. std::wstring ToWinWide(const std::string& str);