Skip to content

Commit

Permalink
libcore: Convenience method for accessing Config variables
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Feb 5, 2017
1 parent 9143d6f commit 641656a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions doomsday/sdk/libcore/include/de/core/config.h
Expand Up @@ -108,6 +108,7 @@ class DENG2_PUBLIC Config : public RecordAccessor, public IObject
Record const &objectNamespace() const;

static Config &get();
static Variable &get(String const &name);
static bool exists();

private:
Expand Down
5 changes: 5 additions & 0 deletions doomsday/sdk/libcore/src/core/config.cpp
Expand Up @@ -212,6 +212,11 @@ Config &Config::get()
return App::config();
}

Variable &Config::get(String const &name) // static
{
return get()[name];
}

bool Config::exists()
{
return App::configExists();
Expand Down

0 comments on commit 641656a

Please sign in to comment.