Disabled exceptions for stl on WIN32. Fixed warnings

This commit is contained in:
2020-07-22 17:37:22 -07:00
parent 46c356ebc5
commit f1d25b4cdf
5 changed files with 8 additions and 4 deletions

View File

@@ -11,6 +11,10 @@ else(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
if (WIN32)
add_definitions(-D_HAS_EXCEPTIONS=0)
endif()
if (NOT WIN32 AND NOT ANDROID)
set(CMAKE_CXX_COMPILER "clang++")
endif()

View File

@@ -41,7 +41,7 @@ KRBundleManager::~KRBundleManager() {
for(unordered_map<std::string, KRBundle *>::iterator itr = m_bundles.begin(); itr != m_bundles.end(); ++itr){
delete (*itr).second;
}
m_bundles.empty();
m_bundles.clear();
}
KRResource* KRBundleManager::loadResource(const std::string& name, const std::string& extension, KRDataBlock* data)

View File

@@ -439,7 +439,7 @@ void ReportWindowsLastError(LPCTSTR lpszFunction)
(lstrlen((LPCTSTR)lpMsgBuf) + lstrlen((LPCTSTR)lpszFunction) + 40) * sizeof(TCHAR));
fprintf(stderr,
TEXT("%s failed with error %d: %s\n"),
lpszFunction, dw, lpMsgBuf);
lpszFunction, dw, (LPCTSTR)lpMsgBuf);
LocalFree(lpMsgBuf);
LocalFree(lpDisplayBuf);

View File

@@ -99,7 +99,7 @@ KRMeshManager::~KRMeshManager() {
for(unordered_multimap<std::string, KRMesh *>::iterator itr = m_models.begin(); itr != m_models.end(); ++itr){
delete (*itr).second;
}
m_models.empty();
m_models.clear();
}
KRResource* KRMeshManager::loadResource(const std::string& name, const std::string& extension, KRDataBlock* data)

View File

@@ -39,7 +39,7 @@ KRSceneManager::~KRSceneManager() {
for(unordered_map<std::string, KRScene *>::iterator itr = m_scenes.begin(); itr != m_scenes.end(); ++itr){
delete (*itr).second;
}
m_scenes.empty();
m_scenes.clear();
}
KRResource* KRSceneManager::loadResource(const std::string& name, const std::string& extension, KRDataBlock* data)