X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Floader.h;h=221361694282228b3e3e1c9b3508505d5b327f9c;hb=eb0f6a0fc9ad34a54df2d9f22e4326c23ddb5bc6;hp=126de575ba027fb0cd241ee4a8f5beb0654550b7;hpb=e2a4cefe59dd3e6e1b2fac2fb7232326bb2b0787;p=libs%2Fdatafile.git diff --git a/source/loader.h b/source/loader.h index 126de57..2213616 100644 --- a/source/loader.h +++ b/source/loader.h @@ -9,7 +9,6 @@ Distributed under the LGPL #define MSP_DATAFILE_LOADER_H_ #include -#include #include #include "except.h" #include "loaderaction.h" @@ -202,10 +201,9 @@ Loads an object from a file. The object must have a public Loader class. template void load(T &obj, const std::string &fn) { - IO::File in(fn); - IO::Buffered buf(in); + IO::BufferedFile in(fn); - Parser parser(buf, fn); + Parser parser(in, fn); typename T::Loader loader(obj); loader.load(parser); } @@ -213,10 +211,9 @@ void load(T &obj, const std::string &fn) template void load(T &obj, const std::string &fn, U &arg) { - IO::File in(fn); - IO::Buffered buf(in); + IO::BufferedFile in(fn); - Parser parser(buf, fn); + Parser parser(in, fn); typename T::Loader loader(obj, arg); loader.load(parser); }