Преглед на файлове

physics: also add set_name/get_name if NDEBUG is set, for ABI compat

rdb преди 6 години
родител
ревизия
5b938278c2
променени са 1 файла, в които са добавени 9 реда и са изтрити 11 реда
  1. 9 11
      panda/src/physics/physicsObject.h

+ 9 - 11
panda/src/physics/physicsObject.h

@@ -87,14 +87,14 @@ PUBLISHED:
   virtual LMatrix4 get_lcs() const;
   virtual PhysicsObject *make_copy() const;
 
-  #ifndef NDEBUG
-    void set_name(const std::string &name) {
-      _name = name;
-    }
-    const std::string& get_name() {
-      return _name;
-    }
-  #endif
+#if !defined(NDEBUG) || !defined(CPPPARSER)
+  void set_name(const std::string &name) {
+    _name = name;
+  }
+  const std::string &get_name() {
+    return _name;
+  }
+#endif
 
   virtual void output(std::ostream &out) const;
   virtual void write(std::ostream &out, int indent=0) const;
@@ -115,9 +115,7 @@ private:
   bool _process_me;
   bool _oriented;
 
-  #ifndef NDEBUG
-    std::string _name;
-  #endif
+  std::string _name;
 
 public:
   static TypeHandle get_class_type() {