Fixed so the game does not crash if it cant find data in the config file

This commit is contained in:
tleety
2015-10-15 12:35:58 +02:00
parent 52fe2e697e
commit 46f6289720
2 changed files with 3 additions and 4 deletions
+2 -3
View File
@@ -19,11 +19,10 @@ private:
ConfigFile(std::string path);
public:
template <typename T>
template <typename T, T defaultValue>
T GetValue(std::string key)
{
std::cout << m_ptree.get<T>(key) << std::endl;
return m_ptree.get<T>(key);
return m_ptree.get<T>(key, defaultValue);
}
private: