Fix 1797488: use set_link() rather than modifying the members directly.
[synfig.git] / synfig-core / trunk / src / synfig / value.h
index 53dc12a..ceb8fca 100644 (file)
@@ -204,6 +204,11 @@ public:
        {
                const Type testtype(get_type(x));
 
+               return same_type_as(testtype);
+       }
+
+       bool same_type_as(const Type testtype)const
+       {
                if(testtype==type)return true;
                if(     (type==TYPE_REAL || type==TYPE_TIME) &&
                        (testtype==TYPE_REAL || testtype==TYPE_TIME) )
@@ -289,9 +294,9 @@ public:
        static const Type get_type(const etl::loose_handle<Canvas>&)
                { return TYPE_CANVAS; }
        static const Type get_type(const list_type&) { return TYPE_LIST; }
-       template <class T> static const Type get_type(const std::vector<T> &x)
+       template <class T> static const Type get_type(const std::vector<T> &/*x*/)
                { return TYPE_LIST; }
-       template <class T> static const Type get_type(const std::list<T> &x)
+       template <class T> static const Type get_type(const std::list<T> &/*x*/)
                { return TYPE_LIST; }
        // ========================================================================