From: Mikko Rasa Date: Mon, 3 Sep 2007 14:28:02 +0000 (+0000) Subject: Fix the n-ary loader X-Git-Tag: 1.0~24 X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=9bd3c79199faf81023a5109ae4999708be79d303;p=libs%2Fdatafile.git Fix the n-ary loader --- diff --git a/source/loader.h b/source/loader.h index 70fb7c2..6a0a1e3 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); }