Skip to content

Commit

Permalink
Refactor|GameMap: Applied the pimpl idiom to GameMap
Browse files Browse the repository at this point in the history
As yet there is no private data, however...
  • Loading branch information
danij-deng committed Apr 3, 2013
1 parent 0083200 commit dbf7e61
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
5 changes: 3 additions & 2 deletions doomsday/client/include/map/gamemap.h
Expand Up @@ -153,8 +153,6 @@ class GameMap
public:
GameMap();

virtual ~GameMap();

/**
* This ID is the name of the lump tag that marks the beginning of map
* data, e.g. "MAP03" or "E2M8".
Expand Down Expand Up @@ -672,6 +670,9 @@ class GameMap
* @todo Replace with a de::Observers-based mechanism.
*/
void updateSurfacesOnMaterialChange(Material &material);

private:
DENG2_PRIVATE(d)
};

/**
Expand Down
12 changes: 7 additions & 5 deletions doomsday/client/src/map/gamemap.cpp
@@ -1,4 +1,4 @@
/** @file gamemap.cpp Gamemap.
/** @file gamemap.cpp World Map.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2006-2013 Daniel Swanson <danij@dengine.net>
Expand Down Expand Up @@ -36,7 +36,12 @@

using namespace de;

GameMap::GameMap()
DENG2_PIMPL(GameMap)
{
Instance(Public *i) : Base(i) {}
};

GameMap::GameMap() : d(new Instance(this))
{
std::memset(_oldUniqueId, 0, sizeof(_oldUniqueId));
std::memset(&aaBox, 0, sizeof(aaBox));
Expand All @@ -62,9 +67,6 @@ GameMap::GameMap()
std::memset(&_traceLine, 0, sizeof(_traceLine));
}

GameMap::~GameMap()
{}

MapElement *GameMap::bspRoot() const
{
return _bspRoot;
Expand Down

0 comments on commit dbf7e61

Please sign in to comment.