diff libinterp/octave-value/cdef-class.h @ 27445:c98953e85220

eliminate unused object_count variable in cdef_class_rep * cdef-class.h, cdef-class.cc (cdef_class::cdef_class_rep::object_count): Delete that is set but never used for any other purpose. (cdef_class::cdef_class_rep): Use private default copy constructor. (cdef_class::cdef_class_rep::register_object, cdef_class::cdef_class_rep::unregister_object, (cdef_class::register_object, cdef_class::unregister_object): Delete. * cdef-object.h, cdef-object.cc (cdef_object_base::register_object, cdef_object_base::register_object): Delete. Remove all uses.
author John W. Eaton <jwe@octave.org>
date Thu, 26 Sep 2019 10:34:59 -0400
parents 396d17dcfb9f
children c409d16b7190
line wrap: on
line diff
--- a/libinterp/octave-value/cdef-class.h	Wed Sep 25 13:49:37 2019 -0400
+++ b/libinterp/octave-value/cdef-class.h	Thu Sep 26 10:34:59 2019 -0400
@@ -55,7 +55,7 @@
     public:
       cdef_class_rep (void)
         : cdef_meta_object_rep (), member_count (0), handle_class (false),
-          object_count (0), meta (false)
+          meta (false)
       { }
 
       cdef_class_rep (const std::list<cdef_class>& superclasses);
@@ -127,10 +127,6 @@
 
       bool is_handle_class (void) const { return handle_class; }
 
-      void register_object (void) { object_count++; }
-
-      void unregister_object (void) { object_count--; }
-
       octave_idx_type static_count (void) const { return member_count; }
 
       void destroy (void)
@@ -198,10 +194,6 @@
 
       std::list<cdef_class> implicit_ctor_list;
 
-      // The number of objects of this class.
-
-      refcount<octave_idx_type> object_count;
-
       // TRUE if this class is a built-in meta class.
 
       bool meta;
@@ -213,12 +205,7 @@
       typedef std::map<std::string,cdef_property>::iterator property_iterator;
       typedef std::map<std::string,cdef_property>::const_iterator property_const_iterator;
 
-      cdef_class_rep (const cdef_class_rep& c)
-        : cdef_meta_object_rep (c), directory (c.directory),
-          method_map (c.method_map), property_map (c.property_map),
-          member_count (c.member_count), handle_class (c.handle_class),
-          implicit_ctor_list (c.implicit_ctor_list),
-          object_count (c.object_count), meta (c.meta) { }
+      cdef_class_rep (const cdef_class_rep& c) = default;
     };
 
   public:
@@ -384,10 +371,6 @@
 
     bool is_meta_class (void) const { return get_rep ()->is_meta_class (); }
 
-    void register_object (void) { get_rep ()->register_object (); }
-
-    void unregister_object (void) { get_rep ()->unregister_object (); }
-
   public:
 
     enum