diff options
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/MCADefrag/CMakeLists.txt | 9 | ||||
-rw-r--r-- | Tools/MCADefrag/MCADefrag.cpp | 2 | ||||
-rw-r--r-- | Tools/ProtoProxy/CMakeLists.txt | 8 | ||||
-rw-r--r-- | Tools/ProtoProxy/ProtoProxy.cpp | 2 | ||||
-rw-r--r-- | Tools/QtBiomeVisualiser/MainWindow.cpp | 8 |
5 files changed, 20 insertions, 9 deletions
diff --git a/Tools/MCADefrag/CMakeLists.txt b/Tools/MCADefrag/CMakeLists.txt index 700310edc..9d600d3ec 100644 --- a/Tools/MCADefrag/CMakeLists.txt +++ b/Tools/MCADefrag/CMakeLists.txt @@ -11,8 +11,13 @@ set_flags() set_lib_flags() enable_profile() - - +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + add_flags_cxx("-Wno-error=sign-conversion -Wno-error=conversion -Wno-error=shorten-64-to-32") + add_flags_cxx("-Wno-error=old-style-cast") + if ("${CLANG_VERSION}" VERSION_GREATER 3.5) + add_flags_cxx("-Wno-error=keyword-macro") + endif() +endif() # Set include paths to the used libraries: include_directories("../../lib") diff --git a/Tools/MCADefrag/MCADefrag.cpp b/Tools/MCADefrag/MCADefrag.cpp index 0d38a87f1..80c6f5be2 100644 --- a/Tools/MCADefrag/MCADefrag.cpp +++ b/Tools/MCADefrag/MCADefrag.cpp @@ -22,7 +22,7 @@ static const Byte g_Zeroes[4096] = {0}; int main(int argc, char ** argv) { - cLogger::cListener * consoleLogListener = MakeConsoleListener(); + cLogger::cListener * consoleLogListener = MakeConsoleListener(false); cLogger::cListener * fileLogListener = new cFileListener(); cLogger::GetInstance().AttachListener(consoleLogListener); cLogger::GetInstance().AttachListener(fileLogListener); diff --git a/Tools/ProtoProxy/CMakeLists.txt b/Tools/ProtoProxy/CMakeLists.txt index ce64db38d..480e6fba8 100644 --- a/Tools/ProtoProxy/CMakeLists.txt +++ b/Tools/ProtoProxy/CMakeLists.txt @@ -14,7 +14,13 @@ include_directories("../../lib") include_directories("../../lib/polarssl/include") include_directories("../../src") - +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + add_flags_cxx("-Wno-error=sign-conversion -Wno-error=conversion -Wno-error=shorten-64-to-32") + add_flags_cxx("-Wno-error=old-style-cast") + if ("${CLANG_VERSION}" VERSION_GREATER 3.5) + add_flags_cxx("-Wno-error=keyword-macro") + endif() +endif() function(flatten_files arg1) set(res "") diff --git a/Tools/ProtoProxy/ProtoProxy.cpp b/Tools/ProtoProxy/ProtoProxy.cpp index 3f427f83f..2d27d7556 100644 --- a/Tools/ProtoProxy/ProtoProxy.cpp +++ b/Tools/ProtoProxy/ProtoProxy.cpp @@ -16,7 +16,7 @@ int main(int argc, char ** argv) { // Initialize logging subsystem: cLogger::InitiateMultithreading(); - auto consoleLogListener = MakeConsoleListener(); + auto consoleLogListener = MakeConsoleListener(false); auto fileLogListener = new cFileListener(); cLogger::GetInstance().AttachListener(consoleLogListener); cLogger::GetInstance().AttachListener(fileLogListener); diff --git a/Tools/QtBiomeVisualiser/MainWindow.cpp b/Tools/QtBiomeVisualiser/MainWindow.cpp index c6ea8656e..8d5b768d8 100644 --- a/Tools/QtBiomeVisualiser/MainWindow.cpp +++ b/Tools/QtBiomeVisualiser/MainWindow.cpp @@ -87,7 +87,7 @@ void MainWindow::newGenerator() // Set the chunk source: cIniFilePtr iniFile = m_GeneratorSetup->getIniFile(); - m_BiomeView->setChunkSource(std::shared_ptr<BioGenSource>(new BioGenSource(iniFile))); + m_BiomeView->setChunkSource(std::make_shared<BioGenSource>(iniFile)); m_BiomeView->redraw(); } @@ -108,7 +108,7 @@ void MainWindow::openGenerator() openGeneratorSetup(worldIni.toStdString()); // Set the chunk source: - m_BiomeView->setChunkSource(std::shared_ptr<BioGenSource>(new BioGenSource(m_GeneratorSetup->getIniFile()))); + m_BiomeView->setChunkSource(std::make_shared<BioGenSource>(m_GeneratorSetup->getIniFile())); m_BiomeView->redraw(); } @@ -129,7 +129,7 @@ void MainWindow::openWorld() closeGeneratorSetup(); // Set the chunk source: - m_BiomeView->setChunkSource(std::shared_ptr<AnvilSource>(new AnvilSource(regionFolder))); + m_BiomeView->setChunkSource(std::make_shared<AnvilSource>(regionFolder)); m_BiomeView->redraw(); } @@ -150,7 +150,7 @@ void MainWindow::openVanillaWorld() closeGeneratorSetup(); // Set the chunk source: - m_BiomeView->setChunkSource(std::shared_ptr<AnvilSource>(new AnvilSource(action->data().toString()))); + m_BiomeView->setChunkSource(std::make_shared<AnvilSource>(action->data().toString())); m_BiomeView->redraw(); } |