commit fff3cc86
Use lean_and_mean, add missing headers
WIN32_LEAN_AND_MEAN makes <windows.h> bring in a lot less junk.
SUCCEEDED macro in winerror.h is used.
Stringapiset.h is needed for WideCharToMultiByte.
Changed files
| M | sago/platform_folders.cpp before |
diff --git a/sago/platform_folders.cpp b/sago/platform_folders.cpp
index 25e9c43..d170d97 100644
--- a/sago/platform_folders.cpp
+++ b/sago/platform_folders.cpp
@@ -33,7 +33,17 @@ SOFTWARE.
#include <cstdlib>
#ifdef _WIN32
+// Make sure we don't bring in all the extra junk with windows.h
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+// stringapiset.h depends on this
#include <windows.h>
+// For SUCCEEDED macro
+#include <winerror.h>
+// For WideCharToMultiByte
+#include <stringapiset.h>
+// For SHGetFolderPathW and various CSIDL "magic numbers"
#include <shlobj.h>
static std::string win32_utf16_to_utf8(const wchar_t* wstr)