瀏覽代碼

switch ReferenceCount derivation

David Rose 24 年之前
父節點
當前提交
456a0aca5e
共有 1 個文件被更改,包括 16 次插入1 次删除
  1. 16 1
      panda/src/putil/cycleData.h

+ 16 - 1
panda/src/putil/cycleData.h

@@ -30,7 +30,22 @@
 //               the data structures that are important to protect
 //               the data structures that are important to protect
 //               between stages of a pipeline.  See PipelineCycler.
 //               between stages of a pipeline.  See PipelineCycler.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDA CycleData : public ReferenceCount {
+#ifdef DO_PIPELINING
+
+// If we are compiling in pipelining support, we maintain a pointer to
+// a CycleData object in each containing class, instead of the object
+// itself.  Thus, it should be a ReferenceCount object.
+class EXPCL_PANDA CycleData : public ReferenceCount 
+
+#else  // !DO_PIPELINING
+
+// If we are *not* compiling in pipelining support, the CycleData
+// object is stored directly within its containing classes, and hence
+// should not be a ReferenceCount object.
+class EXPCL_PANDA CycleData
+
+#endif  // DO_PIPELINING
+{
 public:
 public:
   INLINE CycleData();
   INLINE CycleData();
   virtual ~CycleData();
   virtual ~CycleData();