X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FSettings.hh;h=192e2a764254ba61a4b476a23c51c989422c1db8;hp=42ef70ce54719d2431e0a9260899d63ecc658209;hb=4107dd30ca1a4c7d1a5cd6c0999b9afb5adff779;hpb=58c1f9a499d3bb80ea2869b29c714f61e656d48d diff --git a/src/Moof/Settings.hh b/src/Moof/Settings.hh index 42ef70c..192e2a7 100644 --- a/src/Moof/Settings.hh +++ b/src/Moof/Settings.hh @@ -54,7 +54,7 @@ public: void saveAs(const std::string& path); void save() const; - template + template bool get(const std::string& key, T& value) const; private: @@ -65,11 +65,11 @@ private: }; -template +template bool Settings::get(const std::string& key, T& value) const { Script::Slot top = mScript[-1]; - Script::Slot globals = mScript.getGlobalTable(); + Script::Slot globals = mScript.globals(); std::vector fields; boost::split(fields, key, boost::is_any_of(".")); @@ -85,13 +85,13 @@ bool Settings::get(const std::string& key, T& value) const } else { - mScript.clear(); + mScript.clearStack(); return false; } } bool got = top.get(value); - mScript.clear(); + mScript.clearStack(); return got; }