gobj: Delete assignment operator of Geom* classes

They are unused and it would probably be a bad idea to try to use them.
This commit is contained in:
rdb 2022-03-09 11:17:52 +01:00
parent 6b9dea3e30
commit 72f98ec30d
10 changed files with 10 additions and 96 deletions

View File

@ -62,26 +62,6 @@ Geom(const Geom &copy) :
{
}
/**
* The copy assignment operator is not pipeline-safe. This will completely
* obliterate all stages of the pipeline, so don't do it for a Geom that is
* actively being used for rendering.
*/
void Geom::
operator = (const Geom &copy) {
CopyOnWriteObject::operator = (copy);
clear_cache();
_cycler = copy._cycler;
OPEN_ITERATE_ALL_STAGES(_cycler) {
CDStageWriter cdata(_cycler, pipeline_stage);
mark_internal_bounds_stale(cdata);
}
CLOSE_ITERATE_ALL_STAGES(_cycler);
}
/**
*
*/

View File

@ -62,10 +62,11 @@ protected:
Geom(const Geom &copy);
PUBLISHED:
void operator = (const Geom &copy);
virtual ~Geom();
ALLOC_DELETED_CHAIN(Geom);
void operator = (const Geom &copy) = delete;
virtual Geom *make_copy() const;
INLINE PrimitiveType get_primitive_type() const;

View File

@ -77,17 +77,6 @@ GeomPrimitive(const GeomPrimitive &copy) :
{
}
/**
* The copy assignment operator is not pipeline-safe. This will completely
* obliterate all stages of the pipeline, so don't do it for a GeomPrimitive
* that is actively being used for rendering.
*/
void GeomPrimitive::
operator = (const GeomPrimitive &copy) {
CopyOnWriteObject::operator = (copy);
_cycler = copy._cycler;
}
/**
*
*/

View File

@ -61,10 +61,11 @@ protected:
PUBLISHED:
explicit GeomPrimitive(UsageHint usage_hint);
GeomPrimitive(const GeomPrimitive &copy);
void operator = (const GeomPrimitive &copy);
virtual ~GeomPrimitive();
ALLOC_DELETED_CHAIN(GeomPrimitive);
void operator = (const GeomPrimitive &copy) = delete;
virtual PT(GeomPrimitive) make_copy() const=0;
virtual PrimitiveType get_primitive_type() const=0;

View File

@ -107,30 +107,6 @@ GeomVertexArrayData(const GeomVertexArrayData &copy) :
nassertv(_array_format->is_registered());
}
/**
* The copy assignment operator is not pipeline-safe. This will completely
* obliterate all stages of the pipeline, so don't do it for a
* GeomVertexArrayData that is actively being used for rendering.
*/
void GeomVertexArrayData::
operator = (const GeomVertexArrayData &copy) {
CopyOnWriteObject::operator = (copy);
SimpleLruPage::operator = (copy);
copy.mark_used_lru();
_array_format = copy._array_format;
_cycler = copy._cycler;
OPEN_ITERATE_ALL_STAGES(_cycler) {
CDStageWriter cdata(_cycler, pipeline_stage);
cdata->_modified = Geom::get_next_modified();
}
CLOSE_ITERATE_ALL_STAGES(_cycler);
nassertv(_array_format->is_registered());
}
/**
*
*/

View File

@ -66,10 +66,11 @@ PUBLISHED:
explicit GeomVertexArrayData(const GeomVertexArrayFormat *array_format,
UsageHint usage_hint);
GeomVertexArrayData(const GeomVertexArrayData &copy);
void operator = (const GeomVertexArrayData &copy);
virtual ~GeomVertexArrayData();
ALLOC_DELETED_CHAIN(GeomVertexArrayData);
void operator = (const GeomVertexArrayData &copy) = delete;
int compare_to(const GeomVertexArrayData &other) const;
INLINE const GeomVertexArrayFormat *get_array_format() const;

View File

@ -136,33 +136,6 @@ GeomVertexData(const GeomVertexData &copy,
CLOSE_ITERATE_ALL_STAGES(_cycler);
}
/**
* The copy assignment operator is not pipeline-safe. This will completely
* obliterate all stages of the pipeline, so don't do it for a GeomVertexData
* that is actively being used for rendering.
*/
void GeomVertexData::
operator = (const GeomVertexData &copy) {
CopyOnWriteObject::operator = (copy);
clear_cache();
_name = copy._name;
_cycler = copy._cycler;
_char_pcollector = copy._char_pcollector;
_skinning_pcollector = copy._skinning_pcollector;
_morphs_pcollector = copy._morphs_pcollector;
_blends_pcollector = copy._blends_pcollector;
OPEN_ITERATE_ALL_STAGES(_cycler) {
CDStageWriter cdata(_cycler, pipeline_stage);
cdata->_modified = Geom::get_next_modified();
cdata->_animated_vertices = nullptr;
cdata->_animated_vertices_modified = UpdateSeq();
}
CLOSE_ITERATE_ALL_STAGES(_cycler);
}
/**
*
*/

View File

@ -78,10 +78,11 @@ PUBLISHED:
GeomVertexData(const GeomVertexData &copy);
explicit GeomVertexData(const GeomVertexData &copy,
const GeomVertexFormat *format);
void operator = (const GeomVertexData &copy);
virtual ~GeomVertexData();
ALLOC_DELETED_CHAIN(GeomVertexData);
void operator = (const GeomVertexData &copy) = delete;
int compare_to(const GeomVertexData &other) const;
INLINE const std::string &get_name() const;

View File

@ -67,15 +67,6 @@ GeomTextGlyph(const Geom &copy, const TextGlyph *glyph) :
}
}
/**
*
*/
void GeomTextGlyph::
operator = (const GeomTextGlyph &copy) {
Geom::operator = (copy);
_glyphs = copy._glyphs;
}
/**
*
*/

View File

@ -30,10 +30,11 @@ public:
GeomTextGlyph(const GeomVertexData *data);
GeomTextGlyph(const GeomTextGlyph &copy);
GeomTextGlyph(const Geom &copy, const TextGlyph *glyph);
void operator = (const GeomTextGlyph &copy);
virtual ~GeomTextGlyph();
ALLOC_DELETED_CHAIN(GeomTextGlyph);
void operator = (const GeomTextGlyph &copy) = delete;
virtual Geom *make_copy() const;
virtual bool copy_primitives_from(const Geom *other);
void count_geom(const Geom *other);