X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Floader.h;h=7d5d8d9690dfd1c9460739e7a22332a26e6d5e42;hb=c4930d8d15a5a248ca921e0ed3f9bca8aa18b322;hp=70fb7c2ba762fa2b2a4677c53363ffe7426d3009;hpb=de02b5618273df1b94085934f699371b4be31783;p=libs%2Fdatafile.git diff --git a/source/loader.h b/source/loader.h index 70fb7c2..7d5d8d9 100644 --- a/source/loader.h +++ b/source/loader.h @@ -81,17 +81,17 @@ private: Loads a statement by calling a function that takes an array of values. */ template -class LoaderFunc1 &>: public LoaderAction +class LoaderFunc1 &>: public LoaderAction { public: - typedef void (L::*FuncType)(const std::list &); + typedef void (L::*FuncType)(const std::vector &); LoaderFunc1(FuncType f): func(f) { } void execute(Loader &l, const Statement &st) const { std::vector values; values.reserve(st.args.size()); - for(ValueArray::iterator i=st.args.begin(); i!=st.args.end(); ++i) + for(ValueArray::const_iterator i=st.args.begin(); i!=st.args.end(); ++i) values.push_back(i->get()); (dynamic_cast(l).*func)(values); } @@ -251,12 +251,12 @@ protected: */ template void load_sub(S &s) - { load_sub(s); } + { load_sub(s); } /** Loads a sub-object with a custom Loader class. */ - template + template void load_sub(S &s) { if(!cur_st) @@ -269,7 +269,7 @@ protected: Loads a sub-object with a custom Loader class that takes one argument in addition to to object to be loaded. */ - template + template void load_sub(S &s, T &p) { if(!cur_st)