X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvalue.cpp;h=900361859c5147abebaccf32bf0c6b600479cae5;hb=77f2a03e39858624bffbc6aa04d512ffc46ea22f;hp=2c974349913da7f4968ff748c4c9d41aa5887c4a;hpb=28f28705612902c15cd0702cc891fba35bf2d2df;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/value.cpp b/synfig-core/trunk/src/synfig/value.cpp index 2c97434..9003618 100644 --- a/synfig-core/trunk/src/synfig/value.cpp +++ b/synfig-core/trunk/src/synfig/value.cpp @@ -2,19 +2,20 @@ /*! \file value.cpp ** \brief Template Header ** -** $Id: value.cpp,v 1.1.1.1 2005/01/04 01:23:15 darco Exp $ +** $Id$ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. ** \endlegal */ /* ========================================================================= */ @@ -68,43 +69,43 @@ ValueBase::ValueBase(Type x): switch(type) { case TYPE_BOOL: - static_cast(data)=new bool(); + data=static_cast(new bool()); break; case TYPE_INTEGER: - static_cast(data)=new int(); + data=static_cast(new int()); break; case TYPE_ANGLE: - static_cast(data)=new Angle(); + data=static_cast(new Angle()); break; case TYPE_VECTOR: - static_cast(data)=new Vector(); + data=static_cast(new Vector()); break; case TYPE_TIME: - static_cast(data)=new Time(); + data=static_cast(new Time()); break; case TYPE_REAL: - static_cast(data)=new Real(); + data=static_cast(new Real()); break; case TYPE_COLOR: - static_cast(data)=new Color(); + data=static_cast(new Color()); break; case TYPE_SEGMENT: - static_cast(data)=new Segment(); + data=static_cast(new Segment()); break; case TYPE_BLINEPOINT: - static_cast(data)=new BLinePoint(); + data=static_cast(new BLinePoint()); break; case TYPE_LIST: - static_cast(data)=new list_type(); + data=static_cast(new list_type()); break; case TYPE_STRING: - static_cast(data)=new String(); + data=static_cast(new String()); break; case TYPE_GRADIENT: - static_cast(data)=new Gradient(); + data=static_cast(new Gradient()); break; case TYPE_CANVAS: - static_cast*>(data)=new etl::handle(); + data=static_cast(new etl::handle()); break; default: break; @@ -278,7 +279,7 @@ ValueBase::clear() break; } } - + ref_count.detach(); data=0; type=TYPE_NIL; @@ -368,7 +369,7 @@ ValueBase::operator==(const ValueBase& rhs)const return false; if(data==rhs.data) return true; - + switch(get_type()) { case TYPE_TIME: