Skip to content

Commit

Permalink
Some more compilation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Feb 4, 2017
1 parent f3ddeca commit 8176ff8
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions libs/parser/DefTokeniser.h
Expand Up @@ -3,6 +3,8 @@

#include "ParseException.h"

#include <iostream>
#include <ios>
#include <string>
#include <boost/tokenizer.hpp>

Expand Down
2 changes: 1 addition & 1 deletion radiant/brush/BrushModule.cpp
Expand Up @@ -68,7 +68,7 @@ void BrushModuleImpl::toggleTextureLock() {

scene::INodePtr BrushModuleImpl::createBrush()
{
scene::INodePtr node(new BrushNode);
scene::INodePtr node = std::make_shared<BrushNode>();

// Move it to the active layer
node->moveToLayer(GlobalLayerSystem().getActiveLayer());
Expand Down
2 changes: 1 addition & 1 deletion radiant/brush/BrushNode.cpp
Expand Up @@ -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<BrushNode>(*this);
}

void BrushNode::onInsertIntoScene(scene::IMapRootNode& root)
Expand Down
1 change: 1 addition & 0 deletions radiant/main.cpp
Expand Up @@ -17,6 +17,7 @@
#include <wx/app.h>
#include <wx/cmdline.h>

#include <libintl.h>
#include <exception>

#if defined (_DEBUG) && defined (WIN32) && defined (_MSC_VER)
Expand Down
2 changes: 1 addition & 1 deletion radiant/map/Map.cpp
Expand Up @@ -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<scene::BasicRootNode>();

// Instantiate the default import filter
class MapImportFilter :
Expand Down
4 changes: 2 additions & 2 deletions radiant/patch/PatchCreators.cpp
Expand Up @@ -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<PatchNode>(true);

// Determine the layer patches should be created in
int layer = GlobalLayerSystem().getActiveLayer();
Expand Down Expand Up @@ -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<PatchNode>(false);

// Determine the layer patches should be created in
int layer = GlobalLayerSystem().getActiveLayer();
Expand Down
5 changes: 3 additions & 2 deletions radiant/patch/PatchNode.cpp
Expand Up @@ -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<PatchNode>(*this);
}

void PatchNode::onInsertIntoScene(scene::IMapRootNode& root)
Expand Down

0 comments on commit 8176ff8

Please sign in to comment.