certi-cvs
[Top][All Lists]
Advanced

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

certi/libCERTI Named.cc Object.hh Named.hh


From: certi-cvs
Subject: certi/libCERTI Named.cc Object.hh Named.hh
Date: Sun, 09 Dec 2007 16:26:49 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     Eric NOULARD <erk>      07/12/09 16:26:49

Modified files:
        libCERTI       : Named.cc Object.hh Named.hh 

Log message:
        Fix bug #21761 : 
         class certi::XXXX has virtual functions but non-virtual destructor

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Named.cc?cvsroot=certi&r1=3.4&r2=3.5
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Object.hh?cvsroot=certi&r1=3.17&r2=3.18
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Named.hh?cvsroot=certi&r1=3.3&r2=3.4

Patches:
Index: Named.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Named.cc,v
retrieving revision 3.4
retrieving revision 3.5
diff -u -b -r3.4 -r3.5
--- Named.cc    31 Oct 2007 10:30:20 -0000      3.4
+++ Named.cc    9 Dec 2007 16:26:49 -0000       3.5
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: Named.cc,v 3.4 2007/10/31 10:30:20 erk Exp $
+// $Id: Named.cc,v 3.5 2007/12/09 16:26:49 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include "Named.hh"
@@ -31,6 +31,8 @@
 Named::Named(std::string name)
     : name(name) { }
 
+Named::~Named() {}
+
 void
 Named::setName(std::string name)
 {
@@ -93,4 +95,4 @@
 
 } // certi
 
-// $Id: Named.cc,v 3.4 2007/10/31 10:30:20 erk Exp $
+// $Id: Named.cc,v 3.5 2007/12/09 16:26:49 erk Exp $

Index: Object.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/Object.hh,v
retrieving revision 3.17
retrieving revision 3.18
diff -u -b -r3.17 -r3.18
--- Object.hh   31 Oct 2007 10:30:23 -0000      3.17
+++ Object.hh   9 Dec 2007 16:26:49 -0000       3.18
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: Object.hh,v 3.17 2007/10/31 10:30:23 erk Exp $
+// $Id: Object.hh,v 3.18 2007/12/09 16:26:49 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_OBJECT_HH
@@ -47,7 +47,8 @@
         : Owner(the_owner), name(NULL) { handle = 0 ; };
 
     Object(FederateHandle the_owner, const char *the_name);
-    ~Object();
+    
+    virtual ~Object();
 
     void display() const ;
 
@@ -92,4 +93,4 @@
 
 #endif // _CERTI_OBJECT_HH
 
-// $Id: Object.hh,v 3.17 2007/10/31 10:30:23 erk Exp $
+// $Id: Object.hh,v 3.18 2007/12/09 16:26:49 erk Exp $

Index: Named.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/Named.hh,v
retrieving revision 3.3
retrieving revision 3.4
diff -u -b -r3.3 -r3.4
--- Named.hh    16 Oct 2007 09:28:21 -0000      3.3
+++ Named.hh    9 Dec 2007 16:26:49 -0000       3.4
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: Named.hh,v 3.3 2007/10/16 09:28:21 erk Exp $
+// $Id: Named.hh,v 3.4 2007/12/09 16:26:49 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef LIBCERTI_NAMED_HH
@@ -54,6 +54,12 @@
     Named(const std::string name);
 
     /**
+     * Virtual destructor.
+     * Necessary for a class having virtual methods. 
+     */
+    virtual ~Named();
+
+    /**
      *  Set name.     
      *  @param[in] name the new name
      */
@@ -129,4 +135,4 @@
 
 #endif // LIBCERTI_NAMED_HH
 
-// $Id: Named.hh,v 3.3 2007/10/16 09:28:21 erk Exp $
+// $Id: Named.hh,v 3.4 2007/12/09 16:26:49 erk Exp $




reply via email to

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