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.
This commit is contained in:
rdb 2018-05-23 23:35:27 +02:00
parent 9fad3dba60
commit 3077316782
68 changed files with 101 additions and 719 deletions

View File

@ -567,22 +567,6 @@ DisplayRegionPipelineReader(DisplayRegion *object, Thread *current_thread) :
#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);
}
/**
*
*/

View File

@ -46,25 +46,6 @@ DisplayRegion(GraphicsOutput *window, const LVecBase4 &dimensions) :
_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);
}
/**
*
*/

View File

@ -57,10 +57,8 @@ class CullTraverser;
class EXPCL_PANDA_DISPLAY DisplayRegion : public TypedReferenceCount, public DrawableRegion {
protected:
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:
virtual ~DisplayRegion();
@ -310,9 +308,8 @@ private:
class EXPCL_PANDA_DISPLAY DisplayRegionPipelineReader {
public:
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:
INLINE ~DisplayRegionPipelineReader();

View File

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

View File

@ -30,10 +30,8 @@ class GraphicsPipe;
class EXPCL_PANDA_DISPLAY GraphicsDevice : public TypedReferenceCount {
public:
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:
virtual ~GraphicsDevice();

View File

@ -159,25 +159,6 @@ GraphicsOutput(GraphicsEngine *engine, GraphicsPipe *pipe,
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);
}
/**
*
*/

View File

@ -70,10 +70,8 @@ protected:
GraphicsStateGuardian *gsg,
GraphicsOutput *host,
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:
enum RenderTextureMode {

View File

@ -136,25 +136,6 @@ Multifile::
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
* in, and the list of subfiles becomes available; individual subfiles may

View File

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

View File

@ -47,22 +47,6 @@ FfmpegVirtualFile::
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
* failure. If successful, use get_format_context() to get the open file

View File

@ -34,12 +34,11 @@ struct AVFormatContext;
class EXPCL_FFMPEG FfmpegVirtualFile {
public:
FfmpegVirtualFile();
FfmpegVirtualFile(const FfmpegVirtualFile &copy) = delete;
~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_subfile(const SubfileInfo &info);
void close();

View File

@ -371,23 +371,6 @@ GeomVertexArrayDataHandle(GeomVertexArrayData *object,
#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);
}
/**
*
*/

View File

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

View File

@ -92,17 +92,6 @@ make_copy() const {
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
*/

View File

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

View File

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

View File

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

View File

@ -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);
}
/**
*
*/

View File

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

View File

@ -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
* purpose of flatten. Typically, this will be a new PandaNode with a new

View File

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

View File

@ -37,22 +37,6 @@ RenderAttrib() {
_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
* set if it is there.

View File

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

View File

@ -35,22 +35,6 @@ RenderEffect() {
_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
* set if it is there.

View File

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

View File

@ -48,22 +48,6 @@ RenderEffects() : _lock("RenderEffects") {
_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
* global set if it is there.

View File

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

View File

@ -105,14 +105,6 @@ RenderState(const RenderState &copy) :
#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
* set if it is there.

View File

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

View File

@ -68,22 +68,6 @@ TransformState() : _lock("TransformState") {
#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
* global set if it is there.

View File

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

View File

@ -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.
*/

View File

@ -43,20 +43,19 @@ class EXPCL_PANDA_PIPELINE ConditionVar : public ConditionVarDirect
{
PUBLISHED:
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.
// Use ConditionVarFull if you need to call this method.
INLINE void notify_all();
void notify_all() = delete;
PUBLISHED:
INLINE Mutex &get_mutex() const;
};

View File

@ -11,25 +11,6 @@
* @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.
*/

View File

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

View File

@ -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.
*/

View File

@ -32,10 +32,10 @@
class EXPCL_PANDA_PIPELINE ConditionVarDirect {
public:
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:
INLINE MutexDirect &get_mutex() const;

View File

@ -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.
*/

View File

@ -46,12 +46,11 @@ class EXPCL_PANDA_PIPELINE ConditionVarFull : public ConditionVarFullDirect
{
PUBLISHED:
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;
};

View File

@ -11,25 +11,6 @@
* @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.
*/

View File

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

View File

@ -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.
*/

View File

@ -32,10 +32,10 @@
class EXPCL_PANDA_PIPELINE ConditionVarFullDirect {
public:
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:
INLINE MutexDirect &get_mutex() const;

View File

@ -31,19 +31,3 @@ INLINE CyclerHolder::
_cycler->release();
#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);
}

View File

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

View File

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

View File

@ -50,19 +50,3 @@ INLINE LightMutexHolder::
_mutex->release();
#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);
}

View File

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

View File

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

View File

@ -36,10 +36,10 @@ public:
INLINE explicit LightReMutex(const char *name);
PUBLISHED:
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"

View File

@ -62,19 +62,3 @@ INLINE LightReMutexHolder::
_mutex->release();
#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);
}

View File

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

View File

@ -64,19 +64,3 @@ INLINE MutexHolder::
_mutex->release();
#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);
}

View File

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

View File

@ -30,35 +30,6 @@ PipelineCyclerTrivialImpl(CycleData *initial_data, Pipeline *) {
#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().
* This lock should be held while walking the list of stages.

View File

@ -41,11 +41,10 @@ class Pipeline;
struct EXPCL_PANDA_PIPELINE PipelineCyclerTrivialImpl {
public:
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 release();

View File

@ -23,31 +23,6 @@ Semaphore(int initial_count) :
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
* until the count is nonzero, then decrements it.

View File

@ -30,10 +30,10 @@
class EXPCL_PANDA_PIPELINE Semaphore {
PUBLISHED:
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:
BLOCKING INLINE void acquire();

View File

@ -61,19 +61,3 @@ INLINE ReMutexHolder::
_mutex->release();
#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);
}

View File

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

View File

@ -11,22 +11,6 @@
* @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
* groups", which are expected to run synchronously. This is mainly used for

View File

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

View File

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

View File

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

View File

@ -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.
*/

View File

@ -34,9 +34,9 @@ public:
int x, int y, int x_size, int y_size,
int margin, 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:
virtual ~DynamicTextGlyph();

View File

@ -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);
}
/**
*
*/

View File

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