usata-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Usata-commits] Changes to usata2/src/objects/test_object.cpp


From: David Lau
Subject: [Usata-commits] Changes to usata2/src/objects/test_object.cpp
Date: Fri, 31 Dec 2004 02:56:22 -0500

Index: usata2/src/objects/test_object.cpp
diff -u usata2/src/objects/test_object.cpp:1.3 
usata2/src/objects/test_object.cpp:1.4
--- usata2/src/objects/test_object.cpp:1.3      Fri Dec 31 06:34:14 2004
+++ usata2/src/objects/test_object.cpp  Fri Dec 31 07:27:46 2004
@@ -10,7 +10,7 @@
 // included in the software distribution, or visit
 // http://www.fsf.org/licenses/gpl.html.
 //
-// $Id: test_object.cpp,v 1.3 2004/12/31 06:34:14 skunix Exp $
+// $Id: test_object.cpp,v 1.4 2004/12/31 07:27:46 skunix Exp $
 
 #include "../object.hpp"
 #include "../object-registry.hpp"
@@ -21,7 +21,7 @@
        
        class Something : public Object, public GCInterface
        {
-
+                       std::string n;
                public:
                
                        virtual void    realize(Usata&, const Object_sp& ){};
@@ -31,13 +31,14 @@
                        virtual void    update(void){};
                        virtual void    draw (void){};
                        virtual                 ~Something(){};
-                       virtual std::string name();
+                       virtual const std::string &name();
        };
 
-       std::string
+       const std::string&
        Something::name()
        {
-               return 
(boost::format("address@hidden")%static_cast<void*>(this)).str();
+               
n=(boost::format("address@hidden")%static_cast<void*>(this)).str();
+               return n;
        }
 
        USATA_OBJECT_REGISTER(Something)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]