[Jahshaka-cvs] openlibraries/src/openpluginlib/pl/pcos property.cpp, 1.12, 1.13
Status: Beta
Brought to you by:
jahshaka
From: tim <tim...@us...> - 2006-08-21 15:23:09
|
Update of /cvsroot/openlibraries/openlibraries/src/openpluginlib/pl/pcos In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13918/src/openpluginlib/pl/pcos Modified Files: property.cpp Log Message: - make property a little more forgiving if the property is essentially typeless Index: property.cpp =================================================================== RCS file: /cvsroot/openlibraries/openlibraries/src/openpluginlib/pl/pcos/property.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- property.cpp 22 Jul 2006 15:04:14 -0000 1.12 +++ property.cpp 21 Aug 2006 15:23:04 -0000 1.13 @@ -56,7 +56,7 @@ if ( !m_impl->always_notify && v == m_impl->value ) { - return *this; + return *this; } /// \todo check for ranges here @@ -86,6 +86,11 @@ template < typename T > T property::value() const { + if ( m_impl->value.empty() ) + { + return T(); + } + return any_cast< T >( m_impl->value ); } |