Fixed crash + debug build on windows

This commit is contained in:
Anonymous275 2021-02-21 22:19:30 +02:00 committed by Anonymous275
parent 218504e674
commit 0580ad67fd
4 changed files with 8 additions and 6 deletions

1
.gitignore vendored
View File

@ -473,3 +473,4 @@ cmake-build-release/include/commandline/Makefile
*.marks *.marks
*.internal *.internal
*.xml *.xml
cmake-build-debug/include/commandline/Makefile

1
.idea/vcs.xml generated
View File

@ -10,6 +10,7 @@
<mapping directory="$PROJECT_DIR$/socket.io-client-cpp/lib/asio" vcs="Git" /> <mapping directory="$PROJECT_DIR$/socket.io-client-cpp/lib/asio" vcs="Git" />
<mapping directory="$PROJECT_DIR$/socket.io-client-cpp/lib/catch" vcs="Git" /> <mapping directory="$PROJECT_DIR$/socket.io-client-cpp/lib/catch" vcs="Git" />
<mapping directory="$PROJECT_DIR$/socket.io-client-cpp/lib/rapidjson" vcs="Git" /> <mapping directory="$PROJECT_DIR$/socket.io-client-cpp/lib/rapidjson" vcs="Git" />
<mapping directory="$PROJECT_DIR$/socket.io-client-cpp/lib/rapidjson/thirdparty/gtest" vcs="Git" />
<mapping directory="$PROJECT_DIR$/socket.io-client-cpp/lib/websocketpp" vcs="Git" /> <mapping directory="$PROJECT_DIR$/socket.io-client-cpp/lib/websocketpp" vcs="Git" />
</component> </component>
</project> </project>

View File

@ -76,14 +76,14 @@ static inline void luaprint(const std::string& str) {
} }
#else // DEBUG #else // DEBUG
#define warn(x) Application::Console().Write(std::string(__PRETTY_FUNCTION__) + ":" + std::to_string(__LINE__) + std::string(" [WARN] ") + (x)) #define warn(x) Application::Console().Write(std::string(__func__) + ":" + std::to_string(__LINE__) + std::string(" [WARN] ") + (x))
#define info(x) Application::Console().Write(std::string(__PRETTY_FUNCTION__) + ":" + std::to_string(__LINE__) + std::string(" [INFO] ") + (x)) #define info(x) Application::Console().Write(std::string(__func__) + ":" + std::to_string(__LINE__) + std::string(" [INFO] ") + (x))
#define error(x) Application::Console().Write(std::string(__PRETTY_FUNCTION__) + ":" + std::to_string(__LINE__) + std::string(" [ERROR] ") + (x)) #define error(x) Application::Console().Write(std::string(__func__) + ":" + std::to_string(__LINE__) + std::string(" [ERROR] ") + (x))
#define luaprint(x) Application::Console().Write(std::string(__PRETTY_FUNCTION__) + ":" + std::to_string(__LINE__) + std::string(" [LUA] ") + (x)) #define luaprint(x) Application::Console().Write(std::string(__func__) + ":" + std::to_string(__LINE__) + std::string(" [LUA] ") + (x))
#define debug(x) \ #define debug(x) \
do { \ do { \
if (Application::Settings.DebugModeEnabled) { \ if (Application::Settings.DebugModeEnabled) { \
Application::Console().Write(std::string(__PRETTY_FUNCTION__) + ":" + std::to_string(__LINE__) + std::string(" [DEBUG] ") + (x)); \ Application::Console().Write(std::string(__func__) + ":" + std::to_string(__LINE__) + std::string(" [DEBUG] ") + (x)); \
} \ } \
} while (false) } while (false)
#endif // DEBUG #endif // DEBUG

View File

@ -8,7 +8,7 @@ namespace fs = std::filesystem;
TResourceManager::TResourceManager() { TResourceManager::TResourceManager() {
std::string Path = Application::Settings.Resource + "/Client"; std::string Path = Application::Settings.Resource + "/Client";
if (!fs::exists(Path)) if (!fs::exists(Path))
fs::create_directory(Path); fs::create_directories(Path);
for (const auto& entry : fs::directory_iterator(Path)) { for (const auto& entry : fs::directory_iterator(Path)) {
auto pos = entry.path().string().find(".zip"); auto pos = entry.path().string().find(".zip");
if (pos != std::string::npos) { if (pos != std::string::npos) {