]> git.tdb.fi Git - libs/datafile.git/commitdiff
Remove pointer reload prevention feature; the purpose it was added for is now gone
authorMikko Rasa <tdb@tdb.fi>
Mon, 25 Jul 2011 14:20:41 +0000 (17:20 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 25 Jul 2011 14:22:09 +0000 (17:22 +0300)
source/loader.cpp
source/loader.h
source/loaderaction.h

index 62c4b312d7f61efa1a56ae9d3e74d6dca6d515a0..51cdabec478d812a23a8133f3716b77c58568163 100644 (file)
@@ -46,7 +46,6 @@ namespace DataFile {
 
 Loader::Loader():
        cur_st(0),
-       allow_pointer_reload(true),
        check_sub_loads(false)
 { }
 
index 416bda012dde1992e42417b3912f42721344da08..4ea7994e757f76476dda000f20c67fa44e21fee9 100644 (file)
@@ -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);
 
index 22fb82ad13691209b484383fa421c48fd188b024..a6eb552e981e38f329ab626c34d2cae9c7afc504 100644 (file)
@@ -276,8 +276,6 @@ public:
        virtual void execute(Loader &l, const Statement &st) const
        {
                typename L::Loader &ldr = dynamic_cast<typename L::Loader &>(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<T0>(st.args[0].get<std::string>());
        }