Skip to content

Commit

Permalink
Fix Linux compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Mar 18, 2020
1 parent c70f664 commit 487cce7
Show file tree
Hide file tree
Showing 17 changed files with 50 additions and 16 deletions.
1 change: 1 addition & 0 deletions radiant/layers/LayerModule.cpp
@@ -1,4 +1,5 @@
#include "ilayer.h"
#include "i18n.h"
#include "ieventmanager.h"
#include "icommandsystem.h"
#include "itextstream.h"
Expand Down
1 change: 1 addition & 0 deletions radiant/map/EditingStopwatch.cpp
Expand Up @@ -11,6 +11,7 @@
#include "imapinfofile.h"

#include <fmt/format.h>
#include "string/convert.h"
#include "modulesystem/StaticModule.h"
#include "EditingStopwatchInfoFileModule.h"

Expand Down
5 changes: 2 additions & 3 deletions radiant/map/Map.h
Expand Up @@ -11,6 +11,8 @@
#include "math/Vector3.h"

#include "model/ScaledModelExporter.h"
#include "StartupMapLoader.h"
#include "MapPositionManager.h"

#include <sigc++/signal.h>
#include <wx/stopwatch.h>
Expand All @@ -20,9 +22,6 @@ class TextInputStream;
namespace map
{

class MapPositionManager;
class StartupMapLoader;

class Map :
public IMap,
public scene::Graph::Observer
Expand Down
1 change: 1 addition & 0 deletions radiant/map/algorithm/Import.cpp
Expand Up @@ -3,6 +3,7 @@
#include <map>
#include <limits>

#include "i18n.h"
#include "imap.h"
#include "imapformat.h"
#include "inamespace.h"
Expand Down
1 change: 1 addition & 0 deletions radiant/map/algorithm/Import.h
Expand Up @@ -2,6 +2,7 @@

#include <istream>
#include <string>
#include <memory>

namespace scene
{
Expand Down
13 changes: 10 additions & 3 deletions radiant/map/format/portable/PortableMapFormat.cpp
@@ -1,5 +1,12 @@
#include "PortableMapFormat.h"

#include "ifiletypes.h"
#include "ieclass.h"
#include "ibrush.h"
#include "ipatch.h"
#include "imapformat.h"
#include "iregistry.h"

#include "PortableMapReader.h"
#include "PortableMapWriter.h"

Expand All @@ -9,8 +16,8 @@ namespace map
namespace format
{

std::size_t PortableMapFormat::VERSION = 1;
const char* PortableMapFormat::NAME = "Portable";
std::size_t PortableMapFormat::Version = 1;
const char* PortableMapFormat::Name = "Portable";

// RegisterableModule implementation
const std::string& PortableMapFormat::getName() const
Expand Down Expand Up @@ -55,7 +62,7 @@ void PortableMapFormat::shutdownModule()

const std::string& PortableMapFormat::getMapFormatName() const
{
static std::string _name = NAME;
static std::string _name = Name;
return _name;
}

Expand Down
4 changes: 2 additions & 2 deletions radiant/map/format/portable/PortableMapFormat.h
Expand Up @@ -14,8 +14,8 @@ class PortableMapFormat :
{
public:
// Format version, will be exported as <map> tag attribute
static std::size_t VERSION;
static const char* NAME;
static std::size_t Version;
static const char* Name;

typedef std::shared_ptr<PortableMapFormat> Ptr;

Expand Down
9 changes: 7 additions & 2 deletions radiant/map/format/portable/PortableMapReader.cpp
Expand Up @@ -6,9 +6,14 @@
#include "iselectiongroup.h"
#include "ilayer.h"
#include "ibrush.h"
#include "ieclass.h"
#include "ientity.h"

#include "PortableMapFormat.h"
#include "Constants.h"

#include "scenelib.h"
#include "string/convert.h"
#include "xmlutil/Document.h"
#include "selection/group/SelectionGroupManager.h"

Expand Down Expand Up @@ -55,7 +60,7 @@ void PortableMapReader::readFromStream(std::istream& stream)

auto mapNode = doc.getTopLevelNode();

if (string::convert<std::size_t>(mapNode.getAttributeValue(ATTR_VERSION)) != PortableMapFormat::VERSION)
if (string::convert<std::size_t>(mapNode.getAttributeValue(ATTR_VERSION)) != PortableMapFormat::Version)
{
throw FailureException("Unsupported format version.");
}
Expand Down Expand Up @@ -482,7 +487,7 @@ bool PortableMapReader::CanLoad(std::istream& stream)
std::smatch results;

if (std::regex_search(buffer, results, versionPattern) &&
string::convert<std::size_t>(results[1].str()) <= PortableMapFormat::VERSION)
string::convert<std::size_t>(results[1].str()) <= PortableMapFormat::Version)
{
return true;
}
Expand Down
2 changes: 2 additions & 0 deletions radiant/map/format/portable/PortableMapReader.h
Expand Up @@ -6,6 +6,8 @@
#include "iselectionset.h"
#include "parser/DefTokeniser.h"

namespace xml { class Node; }

namespace map
{

Expand Down
9 changes: 7 additions & 2 deletions radiant/map/format/portable/PortableMapWriter.cpp
Expand Up @@ -2,11 +2,16 @@

#include "igame.h"
#include "ientity.h"
#include "ipatch.h"
#include "imap.h"
#include "ibrush.h"
#include "ilayer.h"
#include "iselectiongroup.h"
#include "iselectionset.h"

#include "string/string.h"
#include "math/Plane3.h"
#include "math/Matrix4.h"
#include "string/convert.h"
#include "selection/group/SelectionGroupManager.h"
#include "PortableMapFormat.h"
#include "Constants.h"
Expand Down Expand Up @@ -53,7 +58,7 @@ PortableMapWriter::PortableMapWriter() :
_curEntityPrimitives(nullptr)
{
// Export name and version tag
_map.setAttributeValue(ATTR_VERSION, string::to_string(PortableMapFormat::VERSION));
_map.setAttributeValue(ATTR_VERSION, string::to_string(PortableMapFormat::Version));
_map.setAttributeValue(ATTR_FORMAT, ATTR_FORMAT_VALUE);
}

Expand Down
11 changes: 8 additions & 3 deletions radiant/selection/algorithm/Group.h
Expand Up @@ -6,8 +6,13 @@
#include <list>
#include "CommandNotAvailableException.h"

namespace selection {
namespace algorithm {
namespace selection
{

class ISelectionGroupManager;

namespace algorithm
{

class ParentPrimitivesToEntityWalker :
public SelectionSystem::Visitor,
Expand Down Expand Up @@ -172,5 +177,5 @@ namespace selection {
void groupSelectedCmd(const cmd::ArgumentList& args);
void ungroupSelectedCmd(const cmd::ArgumentList& args);

} // namespace algorithm
} // namespace algorithm
} // namespace selection
2 changes: 1 addition & 1 deletion radiant/selection/clipboard/Clipboard.cpp
Expand Up @@ -29,7 +29,7 @@ void copy(const cmd::ArgumentList& args)
if (FaceInstance::Selection().empty())
{
// When exporting to the system clipboard, use the portable format
auto format = GlobalMapFormatManager().getMapFormatByName(map::format::PortableMapFormat::NAME);
auto format = GlobalMapFormatManager().getMapFormatByName(map::format::PortableMapFormat::Name);

// Stream selected objects into a stringstream
std::stringstream out;
Expand Down
1 change: 1 addition & 0 deletions radiant/selection/group/SelectionGroupModule.cpp
@@ -1,6 +1,7 @@
#include <functional>

#include "iselectiongroup.h"
#include "i18n.h"
#include "icommandsystem.h"
#include "ieventmanager.h"
#include "imap.h"
Expand Down
2 changes: 2 additions & 0 deletions radiant/selection/selectionset/SelectionSetManager.h
Expand Up @@ -8,6 +8,8 @@
#include <map>
#include "SelectionSet.h"

#include <wx/event.h>

namespace selection
{

Expand Down
2 changes: 2 additions & 0 deletions radiant/selection/selectionset/SelectionSetToolmenu.cpp
Expand Up @@ -13,6 +13,8 @@
#include <wx/combobox.h>
#include <wx/toolbar.h>
#include <wx/sizer.h>
#include <wx/stattext.h>
#include <wx/artprov.h>

namespace selection
{
Expand Down
1 change: 1 addition & 0 deletions radiant/selection/selectionset/SelectionSetToolmenu.h
Expand Up @@ -8,6 +8,7 @@
class wxToolBar;
class wxComboBox;
class wxCommandEvent;
class wxToolBarToolBase;

namespace selection
{
Expand Down
1 change: 1 addition & 0 deletions radiant/ui/mapinfo/LayerInfoTab.cpp
Expand Up @@ -4,6 +4,7 @@
#include "i18n.h"
#include "iradiant.h"
#include "icounter.h"
#include "imap.h"

#include "string/convert.h"

Expand Down

0 comments on commit 487cce7

Please sign in to comment.