Răsfoiți Sursa

general: use proper deleted funcs instead of stubs with asserts

This gives better compile-time diagnostics and saves on code, while also better communicating intent.
rdb 7 ani în urmă
părinte
comite
3077316782
68 a modificat fișierele cu 101 adăugiri și 719 ștergeri
  1. 0 16
      panda/src/display/displayRegion.I
  2. 0 19
      panda/src/display/displayRegion.cxx
  3. 4 7
      panda/src/display/displayRegion.h
  4. 0 16
      panda/src/display/graphicsDevice.cxx
  5. 2 4
      panda/src/display/graphicsDevice.h
  6. 0 19
      panda/src/display/graphicsOutput.cxx
  7. 2 4
      panda/src/display/graphicsOutput.h
  8. 0 19
      panda/src/express/multifile.cxx
  9. 2 3
      panda/src/express/multifile.h
  10. 0 16
      panda/src/ffmpeg/ffmpegVirtualFile.cxx
  11. 3 4
      panda/src/ffmpeg/ffmpegVirtualFile.h
  12. 0 17
      panda/src/gobj/geomVertexArrayData.I
  13. 4 2
      panda/src/gobj/geomVertexArrayData.h
  14. 0 11
      panda/src/grutil/movieTexture.cxx
  15. 1 3
      panda/src/grutil/movieTexture.h
  16. 0 10
      panda/src/grutil/pipeOcclusionCullTraverser.cxx
  17. 1 1
      panda/src/grutil/pipeOcclusionCullTraverser.h
  18. 0 17
      panda/src/pgraph/nodePathComponent.I
  19. 4 2
      panda/src/pgraph/nodePathComponent.h
  20. 0 9
      panda/src/pgraph/pandaNode.cxx
  21. 2 2
      panda/src/pgraph/pandaNode.h
  22. 0 16
      panda/src/pgraph/renderAttrib.cxx
  23. 3 3
      panda/src/pgraph/renderAttrib.h
  24. 0 16
      panda/src/pgraph/renderEffect.cxx
  25. 3 3
      panda/src/pgraph/renderEffect.h
  26. 0 16
      panda/src/pgraph/renderEffects.cxx
  27. 3 4
      panda/src/pgraph/renderEffects.h
  28. 0 8
      panda/src/pgraph/renderState.cxx
  29. 2 1
      panda/src/pgraph/renderState.h
  30. 0 16
      panda/src/pgraph/transformState.cxx
  31. 3 4
      panda/src/pgraph/transformState.h
  32. 0 38
      panda/src/pipeline/conditionVar.I
  33. 8 9
      panda/src/pipeline/conditionVar.h
  34. 0 19
      panda/src/pipeline/conditionVarDebug.I
  35. 3 3
      panda/src/pipeline/conditionVarDebug.h
  36. 0 26
      panda/src/pipeline/conditionVarDirect.I
  37. 4 4
      panda/src/pipeline/conditionVarDirect.h
  38. 0 29
      panda/src/pipeline/conditionVarFull.I
  39. 4 5
      panda/src/pipeline/conditionVarFull.h
  40. 0 19
      panda/src/pipeline/conditionVarFullDebug.I
  41. 3 3
      panda/src/pipeline/conditionVarFullDebug.h
  42. 0 26
      panda/src/pipeline/conditionVarFullDirect.I
  43. 4 4
      panda/src/pipeline/conditionVarFullDirect.h
  44. 0 16
      panda/src/pipeline/cyclerHolder.I
  45. 3 3
      panda/src/pipeline/cyclerHolder.h
  46. 1 1
      panda/src/pipeline/lightMutex.h
  47. 0 16
      panda/src/pipeline/lightMutexHolder.I
  48. 3 3
      panda/src/pipeline/lightMutexHolder.h
  49. 0 15
      panda/src/pipeline/lightReMutex.I
  50. 4 4
      panda/src/pipeline/lightReMutex.h
  51. 0 16
      panda/src/pipeline/lightReMutexHolder.I
  52. 3 3
      panda/src/pipeline/lightReMutexHolder.h
  53. 0 16
      panda/src/pipeline/mutexHolder.I
  54. 3 3
      panda/src/pipeline/mutexHolder.h
  55. 0 29
      panda/src/pipeline/pipelineCyclerTrivialImpl.I
  56. 4 5
      panda/src/pipeline/pipelineCyclerTrivialImpl.h
  57. 0 25
      panda/src/pipeline/psemaphore.I
  58. 4 4
      panda/src/pipeline/psemaphore.h
  59. 0 16
      panda/src/pipeline/reMutexHolder.I
  60. 3 3
      panda/src/pipeline/reMutexHolder.h
  61. 0 16
      panda/src/pipeline/thread.I
  62. 3 4
      panda/src/pipeline/thread.h
  63. 0 9
      panda/src/speedtree/stTree.cxx
  64. 1 2
      panda/src/speedtree/stTree.h
  65. 0 19
      panda/src/text/dynamicTextGlyph.I
  66. 3 3
      panda/src/text/dynamicTextGlyph.h
  67. 0 12
      panda/src/vision/openCVTexture.cxx
  68. 1 3
      panda/src/vision/openCVTexture.h

+ 0 - 16
panda/src/display/displayRegion.I

@@ -567,22 +567,6 @@ DisplayRegionPipelineReader(DisplayRegion *object, Thread *current_thread) :
 #endif // _DEBUG
 #endif // _DEBUG
 }
 }
 
 
-/**
- * Don't attempt to copy these objects.
- */
-INLINE DisplayRegionPipelineReader::
-DisplayRegionPipelineReader(const DisplayRegionPipelineReader &) {
-  nassertv(false);
-}
-
-/**
- * Don't attempt to copy these objects.
- */
-INLINE void DisplayRegionPipelineReader::
-operator = (const DisplayRegionPipelineReader &) {
-  nassertv(false);
-}
-
 /**
 /**
  *
  *
  */
  */

+ 0 - 19
panda/src/display/displayRegion.cxx

@@ -46,25 +46,6 @@ DisplayRegion(GraphicsOutput *window, const LVecBase4 &dimensions) :
   _window->add_display_region(this);
   _window->add_display_region(this);
 }
 }
 
 
-/**
- *
- */
-DisplayRegion::
-DisplayRegion(const DisplayRegion &copy) :
-  _window(NULL),
-  _cull_region_pcollector("Cull:Invalid"),
-  _draw_region_pcollector("Draw:Invalid")
-{
-}
-
-/**
- *
- */
-void DisplayRegion::
-operator = (const DisplayRegion&) {
-  nassertv(false);
-}
-
 /**
 /**
  *
  *
  */
  */

+ 4 - 7
panda/src/display/displayRegion.h

@@ -57,10 +57,8 @@ class CullTraverser;
 class EXPCL_PANDA_DISPLAY DisplayRegion : public TypedReferenceCount, public DrawableRegion {
 class EXPCL_PANDA_DISPLAY DisplayRegion : public TypedReferenceCount, public DrawableRegion {
 protected:
 protected:
   DisplayRegion(GraphicsOutput *window, const LVecBase4 &dimensions);
   DisplayRegion(GraphicsOutput *window, const LVecBase4 &dimensions);
-
-private:
-  DisplayRegion(const DisplayRegion &copy);
-  void operator = (const DisplayRegion &copy);
+  DisplayRegion(const DisplayRegion &copy) = delete;
+  void operator = (const DisplayRegion &copy) = delete;
 
 
 public:
 public:
   virtual ~DisplayRegion();
   virtual ~DisplayRegion();
@@ -310,9 +308,8 @@ private:
 class EXPCL_PANDA_DISPLAY DisplayRegionPipelineReader {
 class EXPCL_PANDA_DISPLAY DisplayRegionPipelineReader {
 public:
 public:
   INLINE DisplayRegionPipelineReader(DisplayRegion *object, Thread *current_thread);
   INLINE DisplayRegionPipelineReader(DisplayRegion *object, Thread *current_thread);
-private:
-  INLINE DisplayRegionPipelineReader(const DisplayRegionPipelineReader &copy);
-  INLINE void operator = (const DisplayRegionPipelineReader &copy);
+  DisplayRegionPipelineReader(const DisplayRegionPipelineReader &copy) = delete;
+  void operator = (const DisplayRegionPipelineReader &copy) = delete;
 
 
 public:
 public:
   INLINE ~DisplayRegionPipelineReader();
   INLINE ~DisplayRegionPipelineReader();

+ 0 - 16
panda/src/display/graphicsDevice.cxx

@@ -34,22 +34,6 @@ GraphicsDevice(GraphicsPipe *pipe) {
   }
   }
 }
 }
 
 
-/**
- *
- */
-GraphicsDevice::
-GraphicsDevice(const GraphicsDevice &) {
-  nassertv(false);
-}
-
-/**
- *
- */
-void GraphicsDevice::
-operator = (const GraphicsDevice &) {
-  nassertv(false);
-}
-
 /**
 /**
  *
  *
  */
  */

+ 2 - 4
panda/src/display/graphicsDevice.h

@@ -30,10 +30,8 @@ class GraphicsPipe;
 class EXPCL_PANDA_DISPLAY GraphicsDevice : public TypedReferenceCount {
 class EXPCL_PANDA_DISPLAY GraphicsDevice : public TypedReferenceCount {
 public:
 public:
   GraphicsDevice(GraphicsPipe *pipe);
   GraphicsDevice(GraphicsPipe *pipe);
-
-private:
-  GraphicsDevice(const GraphicsDevice &copy);
-  void operator = (const GraphicsDevice &copy);
+  GraphicsDevice(const GraphicsDevice &copy) = delete;
+  GraphicsDevice &operator = (const GraphicsDevice &copy) = delete;
 
 
 PUBLISHED:
 PUBLISHED:
   virtual ~GraphicsDevice();
   virtual ~GraphicsDevice();

+ 0 - 19
panda/src/display/graphicsOutput.cxx

@@ -159,25 +159,6 @@ GraphicsOutput(GraphicsEngine *engine, GraphicsPipe *pipe,
   set_clear_color(background_color.get_value());
   set_clear_color(background_color.get_value());
 }
 }
 
 
-/**
- *
- */
-GraphicsOutput::
-GraphicsOutput(const GraphicsOutput &) :
-  _cull_window_pcollector(_cull_pcollector, "Invalid"),
-  _draw_window_pcollector(_draw_pcollector, "Invalid")
-{
-  nassertv(false);
-}
-
-/**
- *
- */
-void GraphicsOutput::
-operator = (const GraphicsOutput &) {
-  nassertv(false);
-}
-
 /**
 /**
  *
  *
  */
  */

+ 2 - 4
panda/src/display/graphicsOutput.h

@@ -70,10 +70,8 @@ protected:
                  GraphicsStateGuardian *gsg,
                  GraphicsStateGuardian *gsg,
                  GraphicsOutput *host,
                  GraphicsOutput *host,
                  bool default_stereo_flags);
                  bool default_stereo_flags);
-
-private:
-  GraphicsOutput(const GraphicsOutput &copy);
-  void operator = (const GraphicsOutput &copy);
+  GraphicsOutput(const GraphicsOutput &copy) = delete;
+  GraphicsOutput &operator = (const GraphicsOutput &copy) = delete;
 
 
 PUBLISHED:
 PUBLISHED:
   enum RenderTextureMode {
   enum RenderTextureMode {

+ 0 - 19
panda/src/express/multifile.cxx

@@ -136,25 +136,6 @@ Multifile::
   close();
   close();
 }
 }
 
 
-/**
- * Don't try to copy Multifiles.
- */
-Multifile::
-Multifile(const Multifile &copy) :
-  _read_filew(_read_file),
-  _read_write_filew(_read_write_file)
-{
-  nassertv(false);
-}
-
-/**
- * Don't try to copy Multifiles.
- */
-void Multifile::
-operator = (const Multifile &copy) {
-  nassertv(false);
-}
-
 /**
 /**
  * Opens the named Multifile on disk for reading.  The Multifile index is read
  * Opens the named Multifile on disk for reading.  The Multifile index is read
  * in, and the list of subfiles becomes available; individual subfiles may
  * in, and the list of subfiles becomes available; individual subfiles may

+ 2 - 3
panda/src/express/multifile.h

@@ -37,11 +37,10 @@ typedef struct evp_pkey_st EVP_PKEY;
 class EXPCL_PANDAEXPRESS Multifile : public ReferenceCount {
 class EXPCL_PANDAEXPRESS Multifile : public ReferenceCount {
 PUBLISHED:
 PUBLISHED:
   Multifile();
   Multifile();
+  Multifile(const Multifile &copy) = delete;
   ~Multifile();
   ~Multifile();
 
 
-private:
-  Multifile(const Multifile &copy);
-  void operator = (const Multifile &copy);
+  Multifile &operator = (const Multifile &copy) = delete;
 
 
 PUBLISHED:
 PUBLISHED:
   BLOCKING bool open_read(const Filename &multifile_name, const streampos &offset = 0);
   BLOCKING bool open_read(const Filename &multifile_name, const streampos &offset = 0);

+ 0 - 16
panda/src/ffmpeg/ffmpegVirtualFile.cxx

@@ -47,22 +47,6 @@ FfmpegVirtualFile::
   close();
   close();
 }
 }
 
 
-/**
- * These objects are not meant to be copied.
- */
-FfmpegVirtualFile::
-FfmpegVirtualFile(const FfmpegVirtualFile &copy) {
-  nassertv(false);
-}
-
-/**
- * These objects are not meant to be copied.
- */
-void FfmpegVirtualFile::
-operator = (const FfmpegVirtualFile &copy) {
-  nassertv(false);
-}
-
 /**
 /**
  * Opens the movie file via Panda's VFS.  Returns true on success, false on
  * Opens the movie file via Panda's VFS.  Returns true on success, false on
  * failure.  If successful, use get_format_context() to get the open file
  * failure.  If successful, use get_format_context() to get the open file

+ 3 - 4
panda/src/ffmpeg/ffmpegVirtualFile.h

@@ -34,12 +34,11 @@ struct AVFormatContext;
 class EXPCL_FFMPEG FfmpegVirtualFile {
 class EXPCL_FFMPEG FfmpegVirtualFile {
 public:
 public:
   FfmpegVirtualFile();
   FfmpegVirtualFile();
+  FfmpegVirtualFile(const FfmpegVirtualFile &copy) = delete;
   ~FfmpegVirtualFile();
   ~FfmpegVirtualFile();
-private:
-  FfmpegVirtualFile(const FfmpegVirtualFile &copy);
-  void operator = (const FfmpegVirtualFile &copy);
 
 
-public:
+  FfmpegVirtualFile &operator = (const FfmpegVirtualFile &copy) = delete;
+
   bool open_vfs(const Filename &filename);
   bool open_vfs(const Filename &filename);
   bool open_subfile(const SubfileInfo &info);
   bool open_subfile(const SubfileInfo &info);
   void close();
   void close();

+ 0 - 17
panda/src/gobj/geomVertexArrayData.I

@@ -371,23 +371,6 @@ GeomVertexArrayDataHandle(GeomVertexArrayData *object,
 #endif
 #endif
 }
 }
 
 
-/**
- * Don't attempt to copy these objects.
- */
-INLINE GeomVertexArrayDataHandle::
-GeomVertexArrayDataHandle(const GeomVertexArrayDataHandle &copy)
-  : _current_thread(copy._current_thread) {
-  nassertv(false);
-}
-
-/**
- * Don't attempt to copy these objects.
- */
-INLINE void GeomVertexArrayDataHandle::
-operator = (const GeomVertexArrayDataHandle &) {
-  nassertv(false);
-}
-
 /**
 /**
  *
  *
  */
  */

+ 4 - 2
panda/src/gobj/geomVertexArrayData.h

@@ -257,15 +257,17 @@ private:
                                    Thread *current_thread);
                                    Thread *current_thread);
   INLINE GeomVertexArrayDataHandle(GeomVertexArrayData *object,
   INLINE GeomVertexArrayDataHandle(GeomVertexArrayData *object,
                                    Thread *current_thread);
                                    Thread *current_thread);
-  INLINE GeomVertexArrayDataHandle(const GeomVertexArrayDataHandle &);
-  INLINE void operator = (const GeomVertexArrayDataHandle &);
 
 
 PUBLISHED:
 PUBLISHED:
   INLINE ~GeomVertexArrayDataHandle();
   INLINE ~GeomVertexArrayDataHandle();
 
 
 public:
 public:
+  GeomVertexArrayDataHandle(const GeomVertexArrayDataHandle &) = delete;
+
   ALLOC_DELETED_CHAIN_DECL(GeomVertexArrayDataHandle);
   ALLOC_DELETED_CHAIN_DECL(GeomVertexArrayDataHandle);
 
 
+  GeomVertexArrayDataHandle &operator = (const GeomVertexArrayDataHandle &) = delete;
+
   INLINE Thread *get_current_thread() const;
   INLINE Thread *get_current_thread() const;
 
 
   INLINE const unsigned char *get_read_pointer(bool force) const RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT);
   INLINE const unsigned char *get_read_pointer(bool force) const RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT);

+ 0 - 11
panda/src/grutil/movieTexture.cxx

@@ -92,17 +92,6 @@ make_copy() const {
   return new CData(*this);
   return new CData(*this);
 }
 }
 
 
-/**
- * Use MovieTexture::make_copy() to make a duplicate copy of an existing
- * MovieTexture.
- */
-MovieTexture::
-MovieTexture(const MovieTexture &copy) :
-  Texture(copy)
-{
-  nassertv(false);
-}
-
 /**
 /**
  * xxx
  * xxx
  */
  */

+ 1 - 3
panda/src/grutil/movieTexture.h

@@ -34,9 +34,7 @@ class EXPCL_PANDA_GRUTIL MovieTexture : public Texture {
 PUBLISHED:
 PUBLISHED:
   explicit MovieTexture(const string &name);
   explicit MovieTexture(const string &name);
   explicit MovieTexture(MovieVideo *video);
   explicit MovieTexture(MovieVideo *video);
-private:
-  MovieTexture(const MovieTexture &copy);
-PUBLISHED:
+  MovieTexture(const MovieTexture &copy) = delete;
   virtual ~MovieTexture();
   virtual ~MovieTexture();
 
 
   INLINE double get_video_length() const;
   INLINE double get_video_length() const;

+ 0 - 10
panda/src/grutil/pipeOcclusionCullTraverser.cxx

@@ -119,16 +119,6 @@ PipeOcclusionCullTraverser(GraphicsOutput *host) {
   _live = true;
   _live = true;
 }
 }
 
 
-/**
- *
- */
-PipeOcclusionCullTraverser::
-PipeOcclusionCullTraverser(const PipeOcclusionCullTraverser &copy) :
-  CullTraverser(copy)
-{
-  nassertv(false);
-}
-
 /**
 /**
  *
  *
  */
  */

+ 1 - 1
panda/src/grutil/pipeOcclusionCullTraverser.h

@@ -42,7 +42,7 @@ class EXPCL_PANDA_GRUTIL PipeOcclusionCullTraverser : public CullTraverser,
                                                public CullHandler {
                                                public CullHandler {
 PUBLISHED:
 PUBLISHED:
   explicit PipeOcclusionCullTraverser(GraphicsOutput *host);
   explicit PipeOcclusionCullTraverser(GraphicsOutput *host);
-  PipeOcclusionCullTraverser(const PipeOcclusionCullTraverser &copy);
+  PipeOcclusionCullTraverser(const PipeOcclusionCullTraverser &copy) = delete;
 
 
   virtual void set_scene(SceneSetup *scene_setup,
   virtual void set_scene(SceneSetup *scene_setup,
                          GraphicsStateGuardianBase *gsg,
                          GraphicsStateGuardianBase *gsg,

+ 0 - 17
panda/src/pgraph/nodePathComponent.I

@@ -29,23 +29,6 @@ CData(const NodePathComponent::CData &copy) :
 {
 {
 }
 }
 
 
-/**
- * NodePathComponents should not be copied.
- */
-INLINE NodePathComponent::
-NodePathComponent(const NodePathComponent &copy) {
-  nassertv(false);
-}
-
-/**
- * NodePathComponents should not be copied.
- */
-INLINE void NodePathComponent::
-operator = (const NodePathComponent &copy) {
-  nassertv(false);
-}
-
-
 /**
 /**
  *
  *
  */
  */

+ 4 - 2
panda/src/pgraph/nodePathComponent.h

@@ -43,13 +43,15 @@ class EXPCL_PANDA_PGRAPH NodePathComponent final : public ReferenceCount {
 private:
 private:
   NodePathComponent(PandaNode *node, NodePathComponent *next,
   NodePathComponent(PandaNode *node, NodePathComponent *next,
                     int pipeline_stage, Thread *current_thread);
                     int pipeline_stage, Thread *current_thread);
-  INLINE NodePathComponent(const NodePathComponent &copy);
-  INLINE void operator = (const NodePathComponent &copy);
 
 
 public:
 public:
+  NodePathComponent(const NodePathComponent &copy) = delete;
   INLINE ~NodePathComponent();
   INLINE ~NodePathComponent();
+
   ALLOC_DELETED_CHAIN(NodePathComponent);
   ALLOC_DELETED_CHAIN(NodePathComponent);
 
 
+  NodePathComponent &operator = (const NodePathComponent &copy) = delete;
+
   INLINE PandaNode *get_node() const;
   INLINE PandaNode *get_node() const;
   INLINE bool has_key() const;
   INLINE bool has_key() const;
   int get_key() const;
   int get_key() const;

+ 0 - 9
panda/src/pgraph/pandaNode.cxx

@@ -175,15 +175,6 @@ PandaNode(const PandaNode &copy) :
   }
   }
 }
 }
 
 
-/**
- * Do not call the copy assignment operator at all.  Use make_copy() or
- * copy_subgraph() to make a copy of a node.
- */
-void PandaNode::
-operator = (const PandaNode &copy) {
-  nassertv(false);
-}
-
 /**
 /**
  * This is similar to make_copy(), but it makes a copy for the specific
  * This is similar to make_copy(), but it makes a copy for the specific
  * purpose of flatten.  Typically, this will be a new PandaNode with a new
  * purpose of flatten.  Typically, this will be a new PandaNode with a new

+ 2 - 2
panda/src/pgraph/pandaNode.h

@@ -71,8 +71,8 @@ PUBLISHED:
 
 
 protected:
 protected:
   PandaNode(const PandaNode &copy);
   PandaNode(const PandaNode &copy);
-private:
-  void operator = (const PandaNode &copy);
+
+  PandaNode &operator = (const PandaNode &copy) = delete;
 
 
 public:
 public:
   virtual PandaNode *dupe_for_flatten() const;
   virtual PandaNode *dupe_for_flatten() const;

+ 0 - 16
panda/src/pgraph/renderAttrib.cxx

@@ -37,22 +37,6 @@ RenderAttrib() {
   _saved_entry = -1;
   _saved_entry = -1;
 }
 }
 
 
-/**
- * RenderAttribs are not meant to be copied.
- */
-RenderAttrib::
-RenderAttrib(const RenderAttrib &) {
-  nassertv(false);
-}
-
-/**
- * RenderAttribs are not meant to be copied.
- */
-void RenderAttrib::
-operator = (const RenderAttrib &) {
-  nassertv(false);
-}
-
 /**
 /**
  * The destructor is responsible for removing the RenderAttrib from the global
  * The destructor is responsible for removing the RenderAttrib from the global
  * set if it is there.
  * set if it is there.

+ 3 - 3
panda/src/pgraph/renderAttrib.h

@@ -51,13 +51,13 @@ class RenderState;
 class EXPCL_PANDA_PGRAPH RenderAttrib : public TypedWritableReferenceCount {
 class EXPCL_PANDA_PGRAPH RenderAttrib : public TypedWritableReferenceCount {
 protected:
 protected:
   RenderAttrib();
   RenderAttrib();
-private:
-  RenderAttrib(const RenderAttrib &copy);
-  void operator = (const RenderAttrib &copy);
 
 
 public:
 public:
+  RenderAttrib(const RenderAttrib &copy) = delete;
   virtual ~RenderAttrib();
   virtual ~RenderAttrib();
 
 
+  RenderAttrib &operator = (const RenderAttrib &copy) = delete;
+
 PUBLISHED:
 PUBLISHED:
   INLINE CPT(RenderAttrib) compose(const RenderAttrib *other) const;
   INLINE CPT(RenderAttrib) compose(const RenderAttrib *other) const;
   INLINE CPT(RenderAttrib) invert_compose(const RenderAttrib *other) const;
   INLINE CPT(RenderAttrib) invert_compose(const RenderAttrib *other) const;

+ 0 - 16
panda/src/pgraph/renderEffect.cxx

@@ -35,22 +35,6 @@ RenderEffect() {
   _saved_entry = _effects->end();
   _saved_entry = _effects->end();
 }
 }
 
 
-/**
- * RenderEffects are not meant to be copied.
- */
-RenderEffect::
-RenderEffect(const RenderEffect &) {
-  nassertv(false);
-}
-
-/**
- * RenderEffects are not meant to be copied.
- */
-void RenderEffect::
-operator = (const RenderEffect &) {
-  nassertv(false);
-}
-
 /**
 /**
  * The destructor is responsible for removing the RenderEffect from the global
  * The destructor is responsible for removing the RenderEffect from the global
  * set if it is there.
  * set if it is there.

+ 3 - 3
panda/src/pgraph/renderEffect.h

@@ -48,13 +48,13 @@ class PandaNode;
 class EXPCL_PANDA_PGRAPH RenderEffect : public TypedWritableReferenceCount {
 class EXPCL_PANDA_PGRAPH RenderEffect : public TypedWritableReferenceCount {
 protected:
 protected:
   RenderEffect();
   RenderEffect();
-private:
-  RenderEffect(const RenderEffect &copy);
-  void operator = (const RenderEffect &copy);
 
 
 public:
 public:
+  RenderEffect(const RenderEffect &copy) = delete;
   virtual ~RenderEffect();
   virtual ~RenderEffect();
 
 
+  RenderEffect &operator = (const RenderEffect &copy) = delete;
+
   virtual bool safe_to_transform() const;
   virtual bool safe_to_transform() const;
   virtual CPT(TransformState) prepare_flatten_transform(const TransformState *net_transform) const;
   virtual CPT(TransformState) prepare_flatten_transform(const TransformState *net_transform) const;
   virtual bool safe_to_combine() const;
   virtual bool safe_to_combine() const;

+ 0 - 16
panda/src/pgraph/renderEffects.cxx

@@ -48,22 +48,6 @@ RenderEffects() : _lock("RenderEffects") {
   _flags = 0;
   _flags = 0;
 }
 }
 
 
-/**
- * RenderEffects are not meant to be copied.
- */
-RenderEffects::
-RenderEffects(const RenderEffects &) {
-  nassertv(false);
-}
-
-/**
- * RenderEffects are not meant to be copied.
- */
-void RenderEffects::
-operator = (const RenderEffects &) {
-  nassertv(false);
-}
-
 /**
 /**
  * The destructor is responsible for removing the RenderEffects from the
  * The destructor is responsible for removing the RenderEffects from the
  * global set if it is there.
  * global set if it is there.

+ 3 - 4
panda/src/pgraph/renderEffects.h

@@ -42,13 +42,12 @@ class EXPCL_PANDA_PGRAPH RenderEffects : public TypedWritableReferenceCount {
 protected:
 protected:
   RenderEffects();
   RenderEffects();
 
 
-private:
-  RenderEffects(const RenderEffects &copy);
-  void operator = (const RenderEffects &copy);
-
 public:
 public:
+  RenderEffects(const RenderEffects &copy) = delete;
   virtual ~RenderEffects();
   virtual ~RenderEffects();
 
 
+  RenderEffects &operator = (const RenderEffects &copy) = delete;
+
   bool safe_to_transform() const;
   bool safe_to_transform() const;
   virtual CPT(TransformState) prepare_flatten_transform(const TransformState *net_transform) const;
   virtual CPT(TransformState) prepare_flatten_transform(const TransformState *net_transform) const;
   bool safe_to_combine() const;
   bool safe_to_combine() const;

+ 0 - 8
panda/src/pgraph/renderState.cxx

@@ -105,14 +105,6 @@ RenderState(const RenderState &copy) :
 #endif
 #endif
 }
 }
 
 
-/**
- * RenderStates are not meant to be copied.
- */
-void RenderState::
-operator = (const RenderState &) {
-  nassertv(false);
-}
-
 /**
 /**
  * The destructor is responsible for removing the RenderState from the global
  * The destructor is responsible for removing the RenderState from the global
  * set if it is there.
  * set if it is there.

+ 2 - 1
panda/src/pgraph/renderState.h

@@ -50,12 +50,13 @@ protected:
 
 
 private:
 private:
   RenderState(const RenderState &copy);
   RenderState(const RenderState &copy);
-  void operator = (const RenderState &copy);
 
 
 public:
 public:
   virtual ~RenderState();
   virtual ~RenderState();
   ALLOC_DELETED_CHAIN(RenderState);
   ALLOC_DELETED_CHAIN(RenderState);
 
 
+  RenderState &operator = (const RenderState &copy) = delete;
+
   typedef RenderAttribRegistry::SlotMask SlotMask;
   typedef RenderAttribRegistry::SlotMask SlotMask;
 
 
 PUBLISHED:
 PUBLISHED:

+ 0 - 16
panda/src/pgraph/transformState.cxx

@@ -68,22 +68,6 @@ TransformState() : _lock("TransformState") {
 #endif
 #endif
 }
 }
 
 
-/**
- * TransformStates are not meant to be copied.
- */
-TransformState::
-TransformState(const TransformState &) {
-  nassertv(false);
-}
-
-/**
- * TransformStates are not meant to be copied.
- */
-void TransformState::
-operator = (const TransformState &) {
-  nassertv(false);
-}
-
 /**
 /**
  * The destructor is responsible for removing the TransformState from the
  * The destructor is responsible for removing the TransformState from the
  * global set if it is there.
  * global set if it is there.

+ 3 - 4
panda/src/pgraph/transformState.h

@@ -55,14 +55,13 @@ class EXPCL_PANDA_PGRAPH TransformState final : public NodeCachedReferenceCount
 protected:
 protected:
   TransformState();
   TransformState();
 
 
-private:
-  TransformState(const TransformState &copy);
-  void operator = (const TransformState &copy);
-
 public:
 public:
+  TransformState(const TransformState &copy) = delete;
   virtual ~TransformState();
   virtual ~TransformState();
   ALLOC_DELETED_CHAIN(TransformState);
   ALLOC_DELETED_CHAIN(TransformState);
 
 
+  TransformState &operator = (const TransformState &copy) = delete;
+
 PUBLISHED:
 PUBLISHED:
   INLINE bool operator != (const TransformState &other) const;
   INLINE bool operator != (const TransformState &other) const;
   INLINE int compare_to(const TransformState &other) const;
   INLINE int compare_to(const TransformState &other) const;

+ 0 - 38
panda/src/pipeline/conditionVar.I

@@ -27,44 +27,6 @@ ConditionVar(Mutex &mutex) :
 {
 {
 }
 }
 
 
-/**
- *
- */
-INLINE ConditionVar::
-~ConditionVar() {
-}
-
-/**
- * Do not attempt to copy condition variables.
- */
-INLINE ConditionVar::
-ConditionVar(const ConditionVar &copy) :
-#ifdef DEBUG_THREADS
-  ConditionVarDebug(copy.get_mutex())
-#else
-  ConditionVarDirect(copy.get_mutex())
-#endif  // DEBUG_THREADS
-{
-  nassertv(false);
-}
-
-/**
- * Do not attempt to copy condition variables.
- */
-INLINE void ConditionVar::
-operator = (const ConditionVar &copy) {
-  nassertv(false);
-}
-
-/**
- * The notify_all() method is specifically *not* provided by ConditionVar.
- * Use ConditionVarFull if you need to call this method.
- */
-INLINE void ConditionVar::
-notify_all() {
-  nassertv(false);
-}
-
 /**
 /**
  * Returns the mutex associated with this condition variable.
  * Returns the mutex associated with this condition variable.
  */
  */

+ 8 - 9
panda/src/pipeline/conditionVar.h

@@ -43,20 +43,19 @@ class EXPCL_PANDA_PIPELINE ConditionVar : public ConditionVarDirect
 {
 {
 PUBLISHED:
 PUBLISHED:
   INLINE explicit ConditionVar(Mutex &mutex);
   INLINE explicit ConditionVar(Mutex &mutex);
-  INLINE ~ConditionVar();
-private:
-  INLINE ConditionVar(const ConditionVar &copy);
-  INLINE void operator = (const ConditionVar &copy);
+  ConditionVar(const ConditionVar &copy) = delete;
+  ~ConditionVar() = default;
 
 
-  // These methods are inherited from the base class.  INLINE void wait();
-  // INLINE void notify();
+  ConditionVar &operator = (const ConditionVar &copy) = delete;
+
+  // These methods are inherited from the base class.
+  //INLINE void wait();
+  //INLINE void notify();
 
 
-private:
   // The notify_all() method is specifically *not* provided by ConditionVar.
   // The notify_all() method is specifically *not* provided by ConditionVar.
   // Use ConditionVarFull if you need to call this method.
   // Use ConditionVarFull if you need to call this method.
-  INLINE void notify_all();
+  void notify_all() = delete;
 
 
-PUBLISHED:
   INLINE Mutex &get_mutex() const;
   INLINE Mutex &get_mutex() const;
 };
 };
 
 

+ 0 - 19
panda/src/pipeline/conditionVarDebug.I

@@ -11,25 +11,6 @@
  * @date 2006-02-13
  * @date 2006-02-13
  */
  */
 
 
-/**
- * Do not attempt to copy condition variables.
- */
-INLINE ConditionVarDebug::
-ConditionVarDebug(const ConditionVarDebug &copy) :
-  _mutex(copy._mutex),
-  _impl(*_mutex._global_lock)
-{
-  nassertv(false);
-}
-
-/**
- * Do not attempt to copy condition variables.
- */
-INLINE void ConditionVarDebug::
-operator = (const ConditionVarDebug &copy) {
-  nassertv(false);
-}
-
 /**
 /**
  * Returns the mutex associated with this condition variable.
  * Returns the mutex associated with this condition variable.
  */
  */

+ 3 - 3
panda/src/pipeline/conditionVarDebug.h

@@ -32,10 +32,10 @@
 class EXPCL_PANDA_PIPELINE ConditionVarDebug {
 class EXPCL_PANDA_PIPELINE ConditionVarDebug {
 public:
 public:
   explicit ConditionVarDebug(MutexDebug &mutex);
   explicit ConditionVarDebug(MutexDebug &mutex);
+  ConditionVarDebug(const ConditionVarDebug &copy) = delete;
   virtual ~ConditionVarDebug();
   virtual ~ConditionVarDebug();
-private:
-  INLINE ConditionVarDebug(const ConditionVarDebug &copy);
-  INLINE void operator = (const ConditionVarDebug &copy);
+
+  ConditionVarDebug &operator = (const ConditionVarDebug &copy) = delete;
 
 
 PUBLISHED:
 PUBLISHED:
   INLINE MutexDebug &get_mutex() const;
   INLINE MutexDebug &get_mutex() const;

+ 0 - 26
panda/src/pipeline/conditionVarDirect.I

@@ -24,32 +24,6 @@ ConditionVarDirect(MutexDirect &mutex) :
 {
 {
 }
 }
 
 
-/**
- *
- */
-INLINE ConditionVarDirect::
-~ConditionVarDirect() {
-}
-
-/**
- * Do not attempt to copy condition variables.
- */
-INLINE ConditionVarDirect::
-ConditionVarDirect(const ConditionVarDirect &copy) :
-  _mutex(copy._mutex),
-  _impl(_mutex._impl)
-{
-  nassertv(false);
-}
-
-/**
- * Do not attempt to copy condition variables.
- */
-INLINE void ConditionVarDirect::
-operator = (const ConditionVarDirect &copy) {
-  nassertv(false);
-}
-
 /**
 /**
  * Returns the mutex associated with this condition variable.
  * Returns the mutex associated with this condition variable.
  */
  */

+ 4 - 4
panda/src/pipeline/conditionVarDirect.h

@@ -32,10 +32,10 @@
 class EXPCL_PANDA_PIPELINE ConditionVarDirect {
 class EXPCL_PANDA_PIPELINE ConditionVarDirect {
 public:
 public:
   INLINE explicit ConditionVarDirect(MutexDirect &mutex);
   INLINE explicit ConditionVarDirect(MutexDirect &mutex);
-  INLINE ~ConditionVarDirect();
-private:
-  INLINE ConditionVarDirect(const ConditionVarDirect &copy);
-  INLINE void operator = (const ConditionVarDirect &copy);
+  ConditionVarDirect(const ConditionVarDirect &copy) = delete;
+  ~ConditionVarDirect() = default;
+
+  ConditionVarDirect &operator = (const ConditionVarDirect &copy) = delete;
 
 
 PUBLISHED:
 PUBLISHED:
   INLINE MutexDirect &get_mutex() const;
   INLINE MutexDirect &get_mutex() const;

+ 0 - 29
panda/src/pipeline/conditionVarFull.I

@@ -27,35 +27,6 @@ ConditionVarFull(Mutex &mutex) :
 {
 {
 }
 }
 
 
-/**
- *
- */
-INLINE ConditionVarFull::
-~ConditionVarFull() {
-}
-
-/**
- * Do not attempt to copy condition variables.
- */
-INLINE ConditionVarFull::
-ConditionVarFull(const ConditionVarFull &copy) :
-#ifdef DEBUG_THREADS
-  ConditionVarFullDebug(copy.get_mutex())
-#else
-  ConditionVarFullDirect(copy.get_mutex())
-#endif  // DEBUG_THREADS
-{
-  nassertv(false);
-}
-
-/**
- * Do not attempt to copy condition variables.
- */
-INLINE void ConditionVarFull::
-operator = (const ConditionVarFull &copy) {
-  nassertv(false);
-}
-
 /**
 /**
  * Returns the mutex associated with this condition variable.
  * Returns the mutex associated with this condition variable.
  */
  */

+ 4 - 5
panda/src/pipeline/conditionVarFull.h

@@ -46,12 +46,11 @@ class EXPCL_PANDA_PIPELINE ConditionVarFull : public ConditionVarFullDirect
 {
 {
 PUBLISHED:
 PUBLISHED:
   INLINE explicit ConditionVarFull(Mutex &mutex);
   INLINE explicit ConditionVarFull(Mutex &mutex);
-  INLINE ~ConditionVarFull();
-private:
-  INLINE ConditionVarFull(const ConditionVarFull &copy);
-  INLINE void operator = (const ConditionVarFull &copy);
+  ConditionVarFull(const ConditionVarFull &copy) = delete;
+  ~ConditionVarFull() = default;
+
+  ConditionVarFull &operator = (const ConditionVarFull &copy) = delete;
 
 
-PUBLISHED:
   INLINE Mutex &get_mutex() const;
   INLINE Mutex &get_mutex() const;
 };
 };
 
 

+ 0 - 19
panda/src/pipeline/conditionVarFullDebug.I

@@ -11,25 +11,6 @@
  * @date 2006-08-28
  * @date 2006-08-28
  */
  */
 
 
-/**
- * Do not attempt to copy condition variables.
- */
-INLINE ConditionVarFullDebug::
-ConditionVarFullDebug(const ConditionVarFullDebug &copy) :
-  _mutex(copy._mutex),
-  _impl(*_mutex._global_lock)
-{
-  nassertv(false);
-}
-
-/**
- * Do not attempt to copy condition variables.
- */
-INLINE void ConditionVarFullDebug::
-operator = (const ConditionVarFullDebug &copy) {
-  nassertv(false);
-}
-
 /**
 /**
  * Returns the mutex associated with this condition variable.
  * Returns the mutex associated with this condition variable.
  */
  */

+ 3 - 3
panda/src/pipeline/conditionVarFullDebug.h

@@ -32,10 +32,10 @@
 class EXPCL_PANDA_PIPELINE ConditionVarFullDebug {
 class EXPCL_PANDA_PIPELINE ConditionVarFullDebug {
 public:
 public:
   explicit ConditionVarFullDebug(MutexDebug &mutex);
   explicit ConditionVarFullDebug(MutexDebug &mutex);
+  ConditionVarFullDebug(const ConditionVarFullDebug &copy) = delete;
   virtual ~ConditionVarFullDebug();
   virtual ~ConditionVarFullDebug();
-private:
-  INLINE ConditionVarFullDebug(const ConditionVarFullDebug &copy);
-  INLINE void operator = (const ConditionVarFullDebug &copy);
+
+  ConditionVarFullDebug &operator = (const ConditionVarFullDebug &copy) = delete;
 
 
 PUBLISHED:
 PUBLISHED:
   INLINE MutexDebug &get_mutex() const;
   INLINE MutexDebug &get_mutex() const;

+ 0 - 26
panda/src/pipeline/conditionVarFullDirect.I

@@ -24,32 +24,6 @@ ConditionVarFullDirect(MutexDirect &mutex) :
 {
 {
 }
 }
 
 
-/**
- *
- */
-INLINE ConditionVarFullDirect::
-~ConditionVarFullDirect() {
-}
-
-/**
- * Do not attempt to copy condition variables.
- */
-INLINE ConditionVarFullDirect::
-ConditionVarFullDirect(const ConditionVarFullDirect &copy) :
-  _mutex(copy._mutex),
-  _impl(_mutex._impl)
-{
-  nassertv(false);
-}
-
-/**
- * Do not attempt to copy condition variables.
- */
-INLINE void ConditionVarFullDirect::
-operator = (const ConditionVarFullDirect &copy) {
-  nassertv(false);
-}
-
 /**
 /**
  * Returns the mutex associated with this condition variable.
  * Returns the mutex associated with this condition variable.
  */
  */

+ 4 - 4
panda/src/pipeline/conditionVarFullDirect.h

@@ -32,10 +32,10 @@
 class EXPCL_PANDA_PIPELINE ConditionVarFullDirect {
 class EXPCL_PANDA_PIPELINE ConditionVarFullDirect {
 public:
 public:
   INLINE explicit ConditionVarFullDirect(MutexDirect &mutex);
   INLINE explicit ConditionVarFullDirect(MutexDirect &mutex);
-  INLINE ~ConditionVarFullDirect();
-private:
-  INLINE ConditionVarFullDirect(const ConditionVarFullDirect &copy);
-  INLINE void operator = (const ConditionVarFullDirect &copy);
+  ConditionVarFullDirect(const ConditionVarFullDirect &copy) = delete;
+  ~ConditionVarFullDirect() = default;
+
+  ConditionVarFullDirect &operator = (const ConditionVarFullDirect &copy) = delete;
 
 
 PUBLISHED:
 PUBLISHED:
   INLINE MutexDirect &get_mutex() const;
   INLINE MutexDirect &get_mutex() const;

+ 0 - 16
panda/src/pipeline/cyclerHolder.I

@@ -31,19 +31,3 @@ INLINE CyclerHolder::
   _cycler->release();
   _cycler->release();
 #endif
 #endif
 }
 }
-
-/**
- * Do not attempt to copy CyclerHolders.
- */
-INLINE CyclerHolder::
-CyclerHolder(const CyclerHolder &copy) {
-  nassertv(false);
-}
-
-/**
- * Do not attempt to copy CyclerHolders.
- */
-INLINE void CyclerHolder::
-operator = (const CyclerHolder &copy) {
-  nassertv(false);
-}

+ 3 - 3
panda/src/pipeline/cyclerHolder.h

@@ -25,10 +25,10 @@
 class EXPCL_PANDA_PIPELINE CyclerHolder {
 class EXPCL_PANDA_PIPELINE CyclerHolder {
 public:
 public:
   INLINE CyclerHolder(PipelineCyclerBase &cycler);
   INLINE CyclerHolder(PipelineCyclerBase &cycler);
+  CyclerHolder(const CyclerHolder &copy) = delete;
   INLINE ~CyclerHolder();
   INLINE ~CyclerHolder();
-private:
-  INLINE CyclerHolder(const CyclerHolder &copy);
-  INLINE void operator = (const CyclerHolder &copy);
+
+  CyclerHolder &operator = (const CyclerHolder &copy) = delete;
 
 
 private:
 private:
 #ifdef DO_PIPELINING
 #ifdef DO_PIPELINING

+ 1 - 1
panda/src/pipeline/lightMutex.h

@@ -48,7 +48,7 @@ PUBLISHED:
   LightMutex(const LightMutex &copy) = delete;
   LightMutex(const LightMutex &copy) = delete;
   ~LightMutex() = default;
   ~LightMutex() = default;
 
 
-  void operator = (const LightMutex &copy) = delete;
+  LightMutex &operator = (const LightMutex &copy) = delete;
 };
 };
 
 
 #include "lightMutex.I"
 #include "lightMutex.I"

+ 0 - 16
panda/src/pipeline/lightMutexHolder.I

@@ -50,19 +50,3 @@ INLINE LightMutexHolder::
   _mutex->release();
   _mutex->release();
 #endif
 #endif
 }
 }
-
-/**
- * Do not attempt to copy LightMutexHolders.
- */
-INLINE LightMutexHolder::
-LightMutexHolder(const LightMutexHolder &copy) {
-  nassertv(false);
-}
-
-/**
- * Do not attempt to copy LightMutexHolders.
- */
-INLINE void LightMutexHolder::
-operator = (const LightMutexHolder &copy) {
-  nassertv(false);
-}

+ 3 - 3
panda/src/pipeline/lightMutexHolder.h

@@ -26,10 +26,10 @@ class EXPCL_PANDA_PIPELINE LightMutexHolder {
 public:
 public:
   INLINE LightMutexHolder(const LightMutex &mutex);
   INLINE LightMutexHolder(const LightMutex &mutex);
   INLINE LightMutexHolder(LightMutex *&mutex);
   INLINE LightMutexHolder(LightMutex *&mutex);
+  LightMutexHolder(const LightMutexHolder &copy) = delete;
   INLINE ~LightMutexHolder();
   INLINE ~LightMutexHolder();
-private:
-  INLINE LightMutexHolder(const LightMutexHolder &copy);
-  INLINE void operator = (const LightMutexHolder &copy);
+
+  LightMutexHolder &operator = (const LightMutexHolder &copy) = delete;
 
 
 private:
 private:
 #if defined(HAVE_THREADS) || defined(DEBUG_THREADS)
 #if defined(HAVE_THREADS) || defined(DEBUG_THREADS)

+ 0 - 15
panda/src/pipeline/lightReMutex.I

@@ -46,18 +46,3 @@ LightReMutex(const string &)
 #endif  // DEBUG_THREADS
 #endif  // DEBUG_THREADS
 {
 {
 }
 }
-
-/**
- *
- */
-INLINE LightReMutex::
-~LightReMutex() {
-}
-
-/**
- * Do not attempt to copy mutexes.
- */
-INLINE void LightReMutex::
-operator = (const LightReMutex &copy) {
-  nassertv(false);
-}

+ 4 - 4
panda/src/pipeline/lightReMutex.h

@@ -36,10 +36,10 @@ public:
   INLINE explicit LightReMutex(const char *name);
   INLINE explicit LightReMutex(const char *name);
 PUBLISHED:
 PUBLISHED:
   INLINE explicit LightReMutex(const string &name);
   INLINE explicit LightReMutex(const string &name);
-  INLINE ~LightReMutex();
-private:
-  INLINE LightReMutex(const LightReMutex &copy);
-  INLINE void operator = (const LightReMutex &copy);
+  LightReMutex(const LightReMutex &copy) = delete;
+  ~LightReMutex() = default;
+
+  LightReMutex &operator = (const LightReMutex &copy) = delete;
 };
 };
 
 
 #include "lightReMutex.I"
 #include "lightReMutex.I"

+ 0 - 16
panda/src/pipeline/lightReMutexHolder.I

@@ -62,19 +62,3 @@ INLINE LightReMutexHolder::
   _mutex->release();
   _mutex->release();
 #endif
 #endif
 }
 }
-
-/**
- * Do not attempt to copy LightReMutexHolders.
- */
-INLINE LightReMutexHolder::
-LightReMutexHolder(const LightReMutexHolder &copy) {
-  nassertv(false);
-}
-
-/**
- * Do not attempt to copy LightReMutexHolders.
- */
-INLINE void LightReMutexHolder::
-operator = (const LightReMutexHolder &copy) {
-  nassertv(false);
-}

+ 3 - 3
panda/src/pipeline/lightReMutexHolder.h

@@ -27,10 +27,10 @@ public:
   INLINE LightReMutexHolder(const LightReMutex &mutex);
   INLINE LightReMutexHolder(const LightReMutex &mutex);
   INLINE LightReMutexHolder(const LightReMutex &mutex, Thread *current_thread);
   INLINE LightReMutexHolder(const LightReMutex &mutex, Thread *current_thread);
   INLINE LightReMutexHolder(LightReMutex *&mutex);
   INLINE LightReMutexHolder(LightReMutex *&mutex);
+  LightReMutexHolder(const LightReMutexHolder &copy) = delete;
   INLINE ~LightReMutexHolder();
   INLINE ~LightReMutexHolder();
-private:
-  INLINE LightReMutexHolder(const LightReMutexHolder &copy);
-  INLINE void operator = (const LightReMutexHolder &copy);
+
+  LightReMutexHolder &operator = (const LightReMutexHolder &copy) = delete;
 
 
 private:
 private:
 #if defined(HAVE_THREADS) || defined(DEBUG_THREADS)
 #if defined(HAVE_THREADS) || defined(DEBUG_THREADS)

+ 0 - 16
panda/src/pipeline/mutexHolder.I

@@ -64,19 +64,3 @@ INLINE MutexHolder::
   _mutex->release();
   _mutex->release();
 #endif
 #endif
 }
 }
-
-/**
- * Do not attempt to copy MutexHolders.
- */
-INLINE MutexHolder::
-MutexHolder(const MutexHolder &copy) {
-  nassertv(false);
-}
-
-/**
- * Do not attempt to copy MutexHolders.
- */
-INLINE void MutexHolder::
-operator = (const MutexHolder &copy) {
-  nassertv(false);
-}

+ 3 - 3
panda/src/pipeline/mutexHolder.h

@@ -27,10 +27,10 @@ public:
   INLINE MutexHolder(const Mutex &mutex);
   INLINE MutexHolder(const Mutex &mutex);
   INLINE MutexHolder(const Mutex &mutex, Thread *current_thread);
   INLINE MutexHolder(const Mutex &mutex, Thread *current_thread);
   INLINE MutexHolder(Mutex *&mutex);
   INLINE MutexHolder(Mutex *&mutex);
+  MutexHolder(const MutexHolder &copy) = delete;
   INLINE ~MutexHolder();
   INLINE ~MutexHolder();
-private:
-  INLINE MutexHolder(const MutexHolder &copy);
-  INLINE void operator = (const MutexHolder &copy);
+
+  MutexHolder &operator = (const MutexHolder &copy) = delete;
 
 
 private:
 private:
   // If HAVE_THREADS is defined, the Mutex class implements an actual mutex
   // If HAVE_THREADS is defined, the Mutex class implements an actual mutex

+ 0 - 29
panda/src/pipeline/pipelineCyclerTrivialImpl.I

@@ -30,35 +30,6 @@ PipelineCyclerTrivialImpl(CycleData *initial_data, Pipeline *) {
 #endif  // SIMPLE_STRUCT_POINTERS
 #endif  // SIMPLE_STRUCT_POINTERS
 }
 }
 
 
-/**
- *
- */
-INLINE PipelineCyclerTrivialImpl::
-PipelineCyclerTrivialImpl(const PipelineCyclerTrivialImpl &) {
-  // The copy constructor for the PipelineCyclerTrivialImpl case doesn't work.
-  // Don't try to use it.  The PipelineCycler template class is ifdeffed
-  // appropriately to call the normal constructor instead.
-  nassertv(false);
-}
-
-/**
- *
- */
-INLINE void PipelineCyclerTrivialImpl::
-operator = (const PipelineCyclerTrivialImpl &) {
-  // The copy assignment operator for the PipelineCyclerTrivialImpl case
-  // doesn't work.  Don't try to use it.  The PipelineCycler template class is
-  // ifdeffed appropriately not to call this method.
-  nassertv(false);
-}
-
-/**
- *
- */
-INLINE PipelineCyclerTrivialImpl::
-~PipelineCyclerTrivialImpl() {
-}
-
 /**
 /**
  * Grabs an overall lock on the cycler.  Release it with a call to release().
  * Grabs an overall lock on the cycler.  Release it with a call to release().
  * This lock should be held while walking the list of stages.
  * This lock should be held while walking the list of stages.

+ 4 - 5
panda/src/pipeline/pipelineCyclerTrivialImpl.h

@@ -41,11 +41,10 @@ class Pipeline;
 struct EXPCL_PANDA_PIPELINE PipelineCyclerTrivialImpl {
 struct EXPCL_PANDA_PIPELINE PipelineCyclerTrivialImpl {
 public:
 public:
   INLINE PipelineCyclerTrivialImpl(CycleData *initial_data, Pipeline *pipeline = NULL);
   INLINE PipelineCyclerTrivialImpl(CycleData *initial_data, Pipeline *pipeline = NULL);
-private:
-  INLINE PipelineCyclerTrivialImpl(const PipelineCyclerTrivialImpl &copy);
-  INLINE void operator = (const PipelineCyclerTrivialImpl &copy);
-public:
-  INLINE ~PipelineCyclerTrivialImpl();
+  PipelineCyclerTrivialImpl(const PipelineCyclerTrivialImpl &copy) = delete;
+  ~PipelineCyclerTrivialImpl() = default;
+
+  PipelineCyclerTrivialImpl &operator = (const PipelineCyclerTrivialImpl &copy) = delete;
 
 
   INLINE void acquire(Thread *current_thread = NULL);
   INLINE void acquire(Thread *current_thread = NULL);
   INLINE void release();
   INLINE void release();

+ 0 - 25
panda/src/pipeline/psemaphore.I

@@ -23,31 +23,6 @@ Semaphore(int initial_count) :
   nassertv(_count >= 0);
   nassertv(_count >= 0);
 }
 }
 
 
-/**
- *
- */
-INLINE Semaphore::
-~Semaphore() {
-}
-
-/**
- * Do not attempt to copy semaphores.
- */
-INLINE Semaphore::
-Semaphore(const Semaphore &copy) :
-  _cvar(_lock)
-{
-  nassertv(false);
-}
-
-/**
- * Do not attempt to copy semaphores.
- */
-INLINE void Semaphore::
-operator = (const Semaphore &copy) {
-  nassertv(false);
-}
-
 /**
 /**
  * Decrements the internal count.  If the count was already at zero, blocks
  * Decrements the internal count.  If the count was already at zero, blocks
  * until the count is nonzero, then decrements it.
  * until the count is nonzero, then decrements it.

+ 4 - 4
panda/src/pipeline/psemaphore.h

@@ -30,10 +30,10 @@
 class EXPCL_PANDA_PIPELINE Semaphore {
 class EXPCL_PANDA_PIPELINE Semaphore {
 PUBLISHED:
 PUBLISHED:
   INLINE explicit Semaphore(int initial_count = 1);
   INLINE explicit Semaphore(int initial_count = 1);
-  INLINE ~Semaphore();
-private:
-  INLINE Semaphore(const Semaphore &copy);
-  INLINE void operator = (const Semaphore &copy);
+  Semaphore(const Semaphore &copy) = delete;
+  ~Semaphore() = default;
+
+  Semaphore &operator = (const Semaphore &copy) = delete;
 
 
 PUBLISHED:
 PUBLISHED:
   BLOCKING INLINE void acquire();
   BLOCKING INLINE void acquire();

+ 0 - 16
panda/src/pipeline/reMutexHolder.I

@@ -61,19 +61,3 @@ INLINE ReMutexHolder::
   _mutex->release();
   _mutex->release();
 #endif
 #endif
 }
 }
-
-/**
- * Do not attempt to copy ReMutexHolders.
- */
-INLINE ReMutexHolder::
-ReMutexHolder(const ReMutexHolder &copy) {
-  nassertv(false);
-}
-
-/**
- * Do not attempt to copy ReMutexHolders.
- */
-INLINE void ReMutexHolder::
-operator = (const ReMutexHolder &copy) {
-  nassertv(false);
-}

+ 3 - 3
panda/src/pipeline/reMutexHolder.h

@@ -27,10 +27,10 @@ public:
   INLINE ReMutexHolder(const ReMutex &mutex);
   INLINE ReMutexHolder(const ReMutex &mutex);
   INLINE ReMutexHolder(const ReMutex &mutex, Thread *current_thread);
   INLINE ReMutexHolder(const ReMutex &mutex, Thread *current_thread);
   INLINE ReMutexHolder(ReMutex *&mutex);
   INLINE ReMutexHolder(ReMutex *&mutex);
+  ReMutexHolder(const ReMutexHolder &copy) = delete;
   INLINE ~ReMutexHolder();
   INLINE ~ReMutexHolder();
-private:
-  INLINE ReMutexHolder(const ReMutexHolder &copy);
-  INLINE void operator = (const ReMutexHolder &copy);
+
+  ReMutexHolder &operator = (const ReMutexHolder &copy) = delete;
 
 
 private:
 private:
 #if defined(HAVE_THREADS) || defined(DEBUG_THREADS)
 #if defined(HAVE_THREADS) || defined(DEBUG_THREADS)

+ 0 - 16
panda/src/pipeline/thread.I

@@ -11,22 +11,6 @@
  * @date 2002-08-08
  * @date 2002-08-08
  */
  */
 
 
-/**
- * Do not attempt to copy threads.
- */
-INLINE Thread::
-Thread(const Thread &copy) : _impl(this) {
-  nassertv(false);
-}
-
-/**
- * Do not attempt to copy threads.
- */
-INLINE void Thread::
-operator = (const Thread &copy) {
-  nassertv(false);
-}
-
 /**
 /**
  * Returns the sync name of the thread.  This name collects threads into "sync
  * Returns the sync name of the thread.  This name collects threads into "sync
  * groups", which are expected to run synchronously.  This is mainly used for
  * groups", which are expected to run synchronously.  This is mainly used for

+ 3 - 4
panda/src/pipeline/thread.h

@@ -46,15 +46,14 @@ class AsyncTask;
 class EXPCL_PANDA_PIPELINE Thread : public TypedReferenceCount, public Namable {
 class EXPCL_PANDA_PIPELINE Thread : public TypedReferenceCount, public Namable {
 protected:
 protected:
   Thread(const string &name, const string &sync_name);
   Thread(const string &name, const string &sync_name);
+  Thread(const Thread &copy) = delete;
 
 
 PUBLISHED:
 PUBLISHED:
   virtual ~Thread();
   virtual ~Thread();
 
 
-private:
-  INLINE Thread(const Thread &copy);
-  INLINE void operator = (const Thread &copy);
-
 protected:
 protected:
+  Thread &operator = (const Thread &copy) = delete;
+
   virtual void thread_main()=0;
   virtual void thread_main()=0;
 
 
 PUBLISHED:
 PUBLISHED:

+ 0 - 9
panda/src/speedtree/stTree.cxx

@@ -61,15 +61,6 @@ STTree(const Filename &fullpath) :
   _is_valid = true;
   _is_valid = true;
 }
 }
 
 
-
-/**
- * An STTree copy constructor is not supported.
- */
-STTree::
-STTree(const STTree &copy) {
-  nassertv(false);
-}
-
 /**
 /**
  *
  *
  */
  */

+ 1 - 2
panda/src/speedtree/stTree.h

@@ -28,8 +28,7 @@ class SpeedTreeNode;
 class EXPCL_PANDASPEEDTREE STTree : public TypedReferenceCount, public Namable {
 class EXPCL_PANDASPEEDTREE STTree : public TypedReferenceCount, public Namable {
 PUBLISHED:
 PUBLISHED:
   STTree(const Filename &fullpath);
   STTree(const Filename &fullpath);
-private:
-  STTree(const STTree &copy);
+  STTree(const STTree &copy) = delete;
 
 
 PUBLISHED:
 PUBLISHED:
   INLINE const Filename &get_fullpath() const;
   INLINE const Filename &get_fullpath() const;

+ 0 - 19
panda/src/text/dynamicTextGlyph.I

@@ -39,25 +39,6 @@ DynamicTextGlyph(int character, PN_stdfloat advance) :
 {
 {
 }
 }
 
 
-/**
- * Copying DynamicTextGlyph objects is not allowed.
- */
-INLINE DynamicTextGlyph::
-DynamicTextGlyph(const DynamicTextGlyph &) :
-  TextGlyph(0)
-{
-  nassertv(false);
-}
-
-/**
- * Copying DynamicTextGlyph objects is not allowed.
- */
-INLINE void DynamicTextGlyph::
-operator = (const DynamicTextGlyph &) {
-  nassertv(false);
-}
-
-
 /**
 /**
  * Returns the DynamicTextPage that this glyph is on.
  * Returns the DynamicTextPage that this glyph is on.
  */
  */

+ 3 - 3
panda/src/text/dynamicTextGlyph.h

@@ -34,9 +34,9 @@ public:
                           int x, int y, int x_size, int y_size,
                           int x, int y, int x_size, int y_size,
                           int margin, PN_stdfloat advance);
                           int margin, PN_stdfloat advance);
   INLINE DynamicTextGlyph(int character, PN_stdfloat advance);
   INLINE DynamicTextGlyph(int character, PN_stdfloat advance);
-private:
-  INLINE DynamicTextGlyph(const DynamicTextGlyph &copy);
-  INLINE void operator = (const DynamicTextGlyph &copy);
+  DynamicTextGlyph(const DynamicTextGlyph &copy) = delete;
+
+  DynamicTextGlyph &operator = (const DynamicTextGlyph &copy) = delete;
 
 
 PUBLISHED:
 PUBLISHED:
   virtual ~DynamicTextGlyph();
   virtual ~DynamicTextGlyph();

+ 0 - 12
panda/src/vision/openCVTexture.cxx

@@ -48,18 +48,6 @@ OpenCVTexture(const string &name) :
 {
 {
 }
 }
 
 
-/**
- * Use OpenCVTexture::make_copy() to make a duplicate copy of an existing
- * OpenCVTexture.
- */
-OpenCVTexture::
-OpenCVTexture(const OpenCVTexture &copy) :
-  VideoTexture(copy),
-  _pages(copy._pages)
-{
-  nassertv(false);
-}
-
 /**
 /**
  *
  *
  */
  */

+ 1 - 3
panda/src/vision/openCVTexture.h

@@ -29,9 +29,7 @@ struct CvCapture;
 class EXPCL_VISION OpenCVTexture : public VideoTexture {
 class EXPCL_VISION OpenCVTexture : public VideoTexture {
 PUBLISHED:
 PUBLISHED:
   OpenCVTexture(const string &name = string());
   OpenCVTexture(const string &name = string());
-protected:
-  OpenCVTexture(const OpenCVTexture &copy);
-PUBLISHED:
+  OpenCVTexture(const OpenCVTexture &copy) = delete;
   virtual ~OpenCVTexture();
   virtual ~OpenCVTexture();
 
 
   bool from_camera(int camera_index = -1, int z = 0,
   bool from_camera(int camera_index = -1, int z = 0,