Disabled exceptions for stl on WIN32. Fixed warnings
This commit is contained in:
@@ -11,6 +11,10 @@ else(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
|||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
add_definitions(-D_HAS_EXCEPTIONS=0)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT WIN32 AND NOT ANDROID)
|
if (NOT WIN32 AND NOT ANDROID)
|
||||||
set(CMAKE_CXX_COMPILER "clang++")
|
set(CMAKE_CXX_COMPILER "clang++")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ KRBundleManager::~KRBundleManager() {
|
|||||||
for(unordered_map<std::string, KRBundle *>::iterator itr = m_bundles.begin(); itr != m_bundles.end(); ++itr){
|
for(unordered_map<std::string, KRBundle *>::iterator itr = m_bundles.begin(); itr != m_bundles.end(); ++itr){
|
||||||
delete (*itr).second;
|
delete (*itr).second;
|
||||||
}
|
}
|
||||||
m_bundles.empty();
|
m_bundles.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
KRResource* KRBundleManager::loadResource(const std::string& name, const std::string& extension, KRDataBlock* data)
|
KRResource* KRBundleManager::loadResource(const std::string& name, const std::string& extension, KRDataBlock* data)
|
||||||
|
|||||||
@@ -439,7 +439,7 @@ void ReportWindowsLastError(LPCTSTR lpszFunction)
|
|||||||
(lstrlen((LPCTSTR)lpMsgBuf) + lstrlen((LPCTSTR)lpszFunction) + 40) * sizeof(TCHAR));
|
(lstrlen((LPCTSTR)lpMsgBuf) + lstrlen((LPCTSTR)lpszFunction) + 40) * sizeof(TCHAR));
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
TEXT("%s failed with error %d: %s\n"),
|
TEXT("%s failed with error %d: %s\n"),
|
||||||
lpszFunction, dw, lpMsgBuf);
|
lpszFunction, dw, (LPCTSTR)lpMsgBuf);
|
||||||
|
|
||||||
LocalFree(lpMsgBuf);
|
LocalFree(lpMsgBuf);
|
||||||
LocalFree(lpDisplayBuf);
|
LocalFree(lpDisplayBuf);
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ KRMeshManager::~KRMeshManager() {
|
|||||||
for(unordered_multimap<std::string, KRMesh *>::iterator itr = m_models.begin(); itr != m_models.end(); ++itr){
|
for(unordered_multimap<std::string, KRMesh *>::iterator itr = m_models.begin(); itr != m_models.end(); ++itr){
|
||||||
delete (*itr).second;
|
delete (*itr).second;
|
||||||
}
|
}
|
||||||
m_models.empty();
|
m_models.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
KRResource* KRMeshManager::loadResource(const std::string& name, const std::string& extension, KRDataBlock* data)
|
KRResource* KRMeshManager::loadResource(const std::string& name, const std::string& extension, KRDataBlock* data)
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ KRSceneManager::~KRSceneManager() {
|
|||||||
for(unordered_map<std::string, KRScene *>::iterator itr = m_scenes.begin(); itr != m_scenes.end(); ++itr){
|
for(unordered_map<std::string, KRScene *>::iterator itr = m_scenes.begin(); itr != m_scenes.end(); ++itr){
|
||||||
delete (*itr).second;
|
delete (*itr).second;
|
||||||
}
|
}
|
||||||
m_scenes.empty();
|
m_scenes.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
KRResource* KRSceneManager::loadResource(const std::string& name, const std::string& extension, KRDataBlock* data)
|
KRResource* KRSceneManager::loadResource(const std::string& name, const std::string& extension, KRDataBlock* data)
|
||||||
|
|||||||
Reference in New Issue
Block a user