From: <br...@us...> - 2008-09-30 22:25:56
|
Revision: 3706 http://openvrml.svn.sourceforge.net/openvrml/?rev=3706&view=rev Author: braden Date: 2008-09-30 22:25:43 +0000 (Tue, 30 Sep 2008) Log Message: ----------- In the spirit of not returning mutable instances by value, change uri's std::string conversion operator to convert to a const std::string. Modified Paths: -------------- trunk/ChangeLog trunk/src/libopenvrml/openvrml/local/uri.cpp trunk/src/libopenvrml/openvrml/local/uri.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-09-30 22:05:34 UTC (rev 3705) +++ trunk/ChangeLog 2008-09-30 22:25:43 UTC (rev 3706) @@ -1,5 +1,14 @@ 2008-09-30 Braden McDaniel <br...@en...> + In the spirit of not returning mutable instances by value, change + uri's std::string conversion operator to convert to a const + std::string. + + * src/libopenvrml/openvrml/local/uri.cpp + * src/libopenvrml/openvrml/local/uri.h + +2008-09-30 Braden McDaniel <br...@en...> + Moved openvrml::local::uri::resolve_against to openvrml::local::resolve_against (i.e., made it a nonmember function). Modified: trunk/src/libopenvrml/openvrml/local/uri.cpp =================================================================== --- trunk/src/libopenvrml/openvrml/local/uri.cpp 2008-09-30 22:05:34 UTC (rev 3705) +++ trunk/src/libopenvrml/openvrml/local/uri.cpp 2008-09-30 22:25:43 UTC (rev 3706) @@ -133,7 +133,7 @@ return *this; } -openvrml::local::uri::operator std::string() const +openvrml::local::uri::operator const std::string() const OPENVRML_THROW1(std::bad_alloc) { return this->str_; Modified: trunk/src/libopenvrml/openvrml/local/uri.h =================================================================== --- trunk/src/libopenvrml/openvrml/local/uri.h 2008-09-30 22:05:34 UTC (rev 3705) +++ trunk/src/libopenvrml/openvrml/local/uri.h 2008-09-30 22:25:43 UTC (rev 3706) @@ -824,7 +824,7 @@ uri & operator=(const uri & id) OPENVRML_THROW1(std::bad_alloc); - operator std::string() const OPENVRML_THROW1(std::bad_alloc); + operator const std::string() const OPENVRML_THROW1(std::bad_alloc); void swap(uri & id) OPENVRML_NOTHROW; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |