From: Mikko Rasa Date: Mon, 25 Jul 2011 14:20:41 +0000 (+0300) Subject: Remove pointer reload prevention feature; the purpose it was added for is now gone X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=e4beb0453a1cfe200fc97607afab94c3ddee1c65;p=libs%2Fdatafile.git Remove pointer reload prevention feature; the purpose it was added for is now gone --- diff --git a/source/loader.cpp b/source/loader.cpp index 62c4b31..51cdabe 100644 --- a/source/loader.cpp +++ b/source/loader.cpp @@ -46,7 +46,6 @@ namespace DataFile { Loader::Loader(): cur_st(0), - allow_pointer_reload(true), check_sub_loads(false) { } diff --git a/source/loader.h b/source/loader.h index 416bda0..4ea7994 100644 --- a/source/loader.h +++ b/source/loader.h @@ -52,15 +52,12 @@ private: const Statement *cur_st; bool sub_loaded; protected: - bool allow_pointer_reload; bool check_sub_loads; Loader(); public: virtual ~Loader(); - bool is_pointer_reload_allowed() const { return allow_pointer_reload; } - /** Loads statements from a parser. */ void load(Parser &p); diff --git a/source/loaderaction.h b/source/loaderaction.h index 22fb82a..a6eb552 100644 --- a/source/loaderaction.h +++ b/source/loaderaction.h @@ -276,8 +276,6 @@ public: virtual void execute(Loader &l, const Statement &st) const { typename L::Loader &ldr = dynamic_cast(l); - if(!ldr.is_pointer_reload_allowed() && ldr.get_object().*ptr0) - throw InvalidState("The pointer has already been loaded"); ldr.get_object().*ptr0 = ldr.get_collection().template get(st.args[0].get()); }