X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Floader.cpp;fp=source%2Floader.cpp;h=c2de4011232c93da747bfdead7df18af72c6087d;hb=0d8df25704366f3576c417436c90fbac2e479632;hp=2c0fbd12275ffdf4e54715a4ca05fc9524ce430d;hpb=2d289d20a9a4aeac7774976e4213a7c72f1dc75b;p=libs%2Fdatafile.git diff --git a/source/loader.cpp b/source/loader.cpp index 2c0fbd1..c2de401 100644 --- a/source/loader.cpp +++ b/source/loader.cpp @@ -1,3 +1,4 @@ +#include #include #include "dataerror.h" #include "loader.h" @@ -7,16 +8,6 @@ using namespace std; namespace { -template -struct Set -{ - T &ref; - T orig; - - Set(T &r, const T &v): ref(r), orig(r) { r = v; } - ~Set() { ref = orig; } -}; - bool signature_match(char s, char a) { if(s==a) @@ -109,7 +100,7 @@ void Loader::load(const Statement &st) void Loader::load_statement(const Statement &st) { - Set set_cst(cur_st, &st); + SetForScope set_cst(cur_st, &st); try {