AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
BuiltInConfig.cpp File Reference
#include "BuiltInConfig.h"
#include "Config.h"
#include "GitRevision.h"

Go to the source code of this file.

Functions

template<typename Fn >
static std::string GetStringWithDefaultValueFromFunction (std::string const &key, Fn getter)
 

Function Documentation

◆ GetStringWithDefaultValueFromFunction()

template<typename Fn >
static std::string GetStringWithDefaultValueFromFunction ( std::string const &  key,
Fn  getter 
)
static
25{
26 std::string const value = sConfigMgr->GetOption<std::string>(key, "");
27 return value.empty() ? getter() : value;
28}
#define sConfigMgr
Definition: Config.h:74

References sConfigMgr.

Referenced by BuiltInConfig::GetBuildDirectory(), BuiltInConfig::GetCMakeCommand(), BuiltInConfig::GetMySQLExecutable(), and BuiltInConfig::GetSourceDirectory().