Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Feb 8, 2020
1 parent 7500ea5 commit 3e3f49e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
16 changes: 0 additions & 16 deletions doomsday/apps/client/src/def_main.cpp
Expand Up @@ -73,8 +73,6 @@ using namespace res;
#define LOOPi(n) for (i = 0; i < (n); ++i)
#define LOOPk(n) for (k = 0; k < (n); ++k)

RuntimeDefs runtimeDefs;

static bool defsInited;
static mobjinfo_t *gettingFor;

Expand All @@ -83,20 +81,6 @@ static inline FS1 &fileSys()
return App_FileSystem();
}

void RuntimeDefs::clear()
{
for (int i = 0; i < sounds.size(); ++i)
{
Str_Free(&sounds[i].external);
}
sounds.clear();

mobjInfo.clear();
states.clear();
texts.clear();
stateInfo.clear();
}

void Def_Init()
{
::runtimeDefs.clear();
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libs/doomsday/include/doomsday/defs/ded.h
Expand Up @@ -271,7 +271,7 @@ struct Array : public std::vector<PODType>
/**
* Definitions that have been preprocessed for runtime use.
*/
struct RuntimeDefs
struct LIBDOOMSDAY_PUBLIC RuntimeDefs
{
Array<mobjinfo_t> mobjInfo; ///< Map object info database.
Array<state_t> states; ///< State list.
Expand Down
14 changes: 14 additions & 0 deletions doomsday/libs/doomsday/src/defs/ded.cpp
Expand Up @@ -720,3 +720,17 @@ ded_t *DED_Definitions()
}
return defs;
}

void RuntimeDefs::clear()
{
for (int i = 0; i < sounds.size(); ++i)
{
Str_Free(&sounds[i].external);
}
sounds.clear();

mobjInfo.clear();
states.clear();
texts.clear();
stateInfo.clear();
}

0 comments on commit 3e3f49e

Please sign in to comment.