diff --git a/configure.ac b/configure.ac index 09da9866ed..ac0dc89e8a 100644 --- a/configure.ac +++ b/configure.ac @@ -202,7 +202,7 @@ AC_SUBST([AL_LIBS]) # Configure global flags, cancelling any modifications we may have made during # configuration -WARNING_FLAGS="-Wall -Wno-unused-variable -Werror=return-type -Wno-inconsistent-missing-override" +WARNING_FLAGS="-Wall -Wno-unused-variable -Werror=return-type -Wno-inconsistent-missing-override -Wno-potentially-evaluated-expression" CFLAGS="$USER_CFLAGS $WARNING_FLAGS $WX_CFLAGS" CXXFLAGS="$USER_CXXFLAGS $WARNING_FLAGS $WX_CXXFLAGS_ONLY" CPPFLAGS="$USER_CPPFLAGS -DPOSIX $WX_CPPFLAGS $LIBSIGC_CFLAGS -DWXINTL_NO_GETTEXT_MACRO" diff --git a/libs/parser/DefTokeniser.h b/libs/parser/DefTokeniser.h index e3bdbc0d2f..e45cb8e788 100644 --- a/libs/parser/DefTokeniser.h +++ b/libs/parser/DefTokeniser.h @@ -3,6 +3,8 @@ #include "ParseException.h" +#include +#include #include #include diff --git a/radiant/brush/BrushModule.cpp b/radiant/brush/BrushModule.cpp index c13381dedb..f6439e5c7c 100644 --- a/radiant/brush/BrushModule.cpp +++ b/radiant/brush/BrushModule.cpp @@ -68,7 +68,7 @@ void BrushModuleImpl::toggleTextureLock() { scene::INodePtr BrushModuleImpl::createBrush() { - scene::INodePtr node(new BrushNode); + scene::INodePtr node = std::make_shared(); // Move it to the active layer node->moveToLayer(GlobalLayerSystem().getActiveLayer()); diff --git a/radiant/brush/BrushNode.cpp b/radiant/brush/BrushNode.cpp index 3f88c44aab..ed77fb4eef 100644 --- a/radiant/brush/BrushNode.cpp +++ b/radiant/brush/BrushNode.cpp @@ -230,7 +230,7 @@ void BrushNode::translate(const Vector3& translation) } scene::INodePtr BrushNode::clone() const { - return scene::INodePtr(new BrushNode(*this)); + return std::make_shared(*this); } void BrushNode::onInsertIntoScene(scene::IMapRootNode& root) diff --git a/radiant/main.cpp b/radiant/main.cpp index e63e79d10f..adc4b4c8d8 100644 --- a/radiant/main.cpp +++ b/radiant/main.cpp @@ -17,6 +17,7 @@ #include #include +#include #include #if defined (_DEBUG) && defined (WIN32) && defined (_MSC_VER) diff --git a/radiant/map/Map.cpp b/radiant/map/Map.cpp index 7f381516f1..f148f28c79 100644 --- a/radiant/map/Map.cpp +++ b/radiant/map/Map.cpp @@ -876,7 +876,7 @@ void Map::rename(const std::string& filename) { void Map::importSelected(std::istream& in) { - scene::INodePtr root(new scene::BasicRootNode); + scene::INodePtr root = std::make_shared(); // Instantiate the default import filter class MapImportFilter : diff --git a/radiant/patch/PatchCreators.cpp b/radiant/patch/PatchCreators.cpp index 77c4bd2fd8..4be4b0f01e 100644 --- a/radiant/patch/PatchCreators.cpp +++ b/radiant/patch/PatchCreators.cpp @@ -22,7 +22,7 @@ scene::INodePtr Doom3PatchCreator::createPatch() { // Note the true as function argument: // this means that patchDef3 = true in the PatchNode constructor. - scene::INodePtr node(new PatchNode(true)); + scene::INodePtr node = std::make_shared(true); // Determine the layer patches should be created in int layer = GlobalLayerSystem().getActiveLayer(); @@ -138,7 +138,7 @@ void Doom3PatchCreator::registerPatchCommands() scene::INodePtr Doom3PatchDef2Creator::createPatch() { // The PatchNodeDoom3 constructor takes false == patchDef2 - scene::INodePtr node(new PatchNode(false)); + scene::INodePtr node = std::make_shared(false); // Determine the layer patches should be created in int layer = GlobalLayerSystem().getActiveLayer(); diff --git a/radiant/patch/PatchNode.cpp b/radiant/patch/PatchNode.cpp index ea21ebeb38..36173fe952 100644 --- a/radiant/patch/PatchNode.cpp +++ b/radiant/patch/PatchNode.cpp @@ -232,8 +232,9 @@ void PatchNode::selectedChangedComponent(const ISelectable& selectable) { } // Clones this node, allocates a new Node on the heap and passes itself to the constructor of the new node -scene::INodePtr PatchNode::clone() const { - return scene::INodePtr(new PatchNode(*this)); +scene::INodePtr PatchNode::clone() const +{ + return std::make_shared(*this); } void PatchNode::onInsertIntoScene(scene::IMapRootNode& root)