delete copy constructors and assignment operators explicitly
This commit is contained in:
parent
6aa8e432f7
commit
dc5dea6d21
|
|
@ -289,10 +289,10 @@ private:
|
|||
void size_decrement(){
|
||||
--m_size;
|
||||
}
|
||||
|
||||
HashTable( const HashTable& other );
|
||||
HashTable& operator=( const HashTable& other );
|
||||
public:
|
||||
HashTable( const HashTable& other ) = delete; // not copyable
|
||||
HashTable& operator=( const HashTable& other ) = delete; // not assignable
|
||||
|
||||
HashTable() : m_bucketCount( 0 ), m_buckets( 0 ), m_size( 0 ){
|
||||
initialise();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,9 +81,6 @@ class ToggleShown
|
|||
{
|
||||
bool m_shownDeferred;
|
||||
|
||||
ToggleShown( const ToggleShown& other ); // NOT COPYABLE
|
||||
ToggleShown& operator=( const ToggleShown& other ); // NOT ASSIGNABLE
|
||||
|
||||
static gboolean notify_visible( GtkWidget* widget, gpointer dummy, ToggleShown* self ){
|
||||
/* destroy = notify::visible with visible = 0, thus let's filter it out */
|
||||
if( gtk_main_level() > 0 ){ //== 0 at destroy time
|
||||
|
|
@ -103,6 +100,9 @@ public:
|
|||
GtkWidget* m_widget;
|
||||
ToggleItem m_item;
|
||||
|
||||
ToggleShown( const ToggleShown& other ) = delete; // NOT COPYABLE
|
||||
ToggleShown& operator=( const ToggleShown& other ) = delete; // NOT ASSIGNABLE
|
||||
|
||||
ToggleShown( bool shown )
|
||||
: m_shownDeferred( shown ), m_widget( 0 ), m_item( ActiveCaller( *this ) ){
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,12 +34,13 @@ struct RGBAPixel
|
|||
|
||||
class RGBAImage : public Image
|
||||
{
|
||||
RGBAImage( const RGBAImage& other );
|
||||
RGBAImage& operator=( const RGBAImage& other );
|
||||
public:
|
||||
RGBAPixel* pixels;
|
||||
unsigned int width, height;
|
||||
|
||||
RGBAImage( const RGBAImage& other ) = delete; // not copyable
|
||||
RGBAImage& operator=( const RGBAImage& other ) = delete; // not assignable
|
||||
|
||||
RGBAImage( unsigned int _width, unsigned int _height )
|
||||
: pixels( new RGBAPixel[_width * _height] ), width( _width ), height( _height ){
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,9 +40,6 @@ class ModelSkinKey : public ModuleObserver
|
|||
ModelSkin* m_skin;
|
||||
Callback m_skinChangedCallback;
|
||||
|
||||
ModelSkinKey( const ModelSkinKey& );
|
||||
ModelSkinKey operator=( const ModelSkinKey& );
|
||||
|
||||
void construct(){
|
||||
m_skin = &GlobalModelSkinCache().capture( m_name.c_str() );
|
||||
m_skin->attach( *this );
|
||||
|
|
@ -53,6 +50,9 @@ class ModelSkinKey : public ModuleObserver
|
|||
}
|
||||
|
||||
public:
|
||||
ModelSkinKey( const ModelSkinKey& ) = delete; // not copyable
|
||||
ModelSkinKey operator=( const ModelSkinKey& ) = delete; // not assignable
|
||||
|
||||
ModelSkinKey( const Callback& skinChangedCallback ) : m_skinChangedCallback( skinChangedCallback ){
|
||||
construct();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,8 +55,6 @@ class NameKeys : public Entity::Observer, public Namespaced
|
|||
Namespace* m_namespace;
|
||||
EntityKeyValues& m_entity;
|
||||
KeyIsNameFunc m_keyIsName;
|
||||
NameKeys( const NameKeys& other );
|
||||
NameKeys& operator=( const NameKeys& other );
|
||||
|
||||
typedef std::map<CopiedString, EntityKeyValue*> KeyValues;
|
||||
KeyValues m_keyValues;
|
||||
|
|
@ -86,6 +84,9 @@ class NameKeys : public Entity::Observer, public Namespaced
|
|||
}
|
||||
}
|
||||
public:
|
||||
NameKeys( const NameKeys& other ) = delete; // not copyable
|
||||
NameKeys& operator=( const NameKeys& other ) = delete; // not assignable
|
||||
|
||||
NameKeys( EntityKeyValues& entity ) : m_namespace( 0 ), m_entity( entity ), m_keyIsName( Static<KeyIsName>::instance().m_keyIsName ){
|
||||
m_entity.attach( *this );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -453,9 +453,6 @@ class PicoModelInstance :
|
|||
};
|
||||
typedef Array<Remap> SurfaceRemaps;
|
||||
SurfaceRemaps m_skins;
|
||||
|
||||
PicoModelInstance( const PicoModelInstance& );
|
||||
PicoModelInstance operator=( const PicoModelInstance& );
|
||||
public:
|
||||
typedef LazyStatic<TypeCasts> StaticTypeCasts;
|
||||
|
||||
|
|
@ -508,6 +505,9 @@ public:
|
|||
constructRemaps();
|
||||
}
|
||||
|
||||
PicoModelInstance( const PicoModelInstance& ) = delete; // not copyable
|
||||
PicoModelInstance operator=( const PicoModelInstance& ) = delete; // not assignable
|
||||
|
||||
PicoModelInstance( const scene::Path& path, scene::Instance* parent, PicoModel& picomodel ) :
|
||||
Instance( path, parent, this, StaticTypeCasts::instance().get() ),
|
||||
m_picomodel( picomodel ),
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ public:
|
|||
releaseShader();
|
||||
}
|
||||
// copy-construction not supported
|
||||
FaceShader( const FaceShader& other );
|
||||
FaceShader( const FaceShader& other ) = delete;
|
||||
|
||||
void instanceAttach(){
|
||||
m_instanced = true;
|
||||
|
|
@ -487,10 +487,6 @@ public:
|
|||
|
||||
class FaceTexdef : public FaceShaderObserver
|
||||
{
|
||||
// not copyable
|
||||
FaceTexdef( const FaceTexdef& other );
|
||||
// not assignable
|
||||
FaceTexdef& operator=( const FaceTexdef& other );
|
||||
public:
|
||||
class SavedState
|
||||
{
|
||||
|
|
@ -511,6 +507,11 @@ public:
|
|||
bool m_projectionInitialised;
|
||||
bool m_scaleApplied;
|
||||
|
||||
// not copyable
|
||||
FaceTexdef( const FaceTexdef& other ) = delete;
|
||||
// not assignable
|
||||
FaceTexdef& operator=( const FaceTexdef& other ) = delete;
|
||||
|
||||
FaceTexdef(
|
||||
FaceShader& shader,
|
||||
const TextureProjection& projection,
|
||||
|
|
@ -958,13 +959,13 @@ private:
|
|||
UndoObserver* m_undoable_observer;
|
||||
MapFile* m_map;
|
||||
|
||||
// assignment not supported
|
||||
Face& operator=( const Face& other );
|
||||
// copy-construction not supported
|
||||
Face( const Face& other );
|
||||
|
||||
public:
|
||||
|
||||
// assignment not supported
|
||||
Face& operator=( const Face& other ) = delete;
|
||||
// copy-construction not supported
|
||||
Face( const Face& other ) = delete;
|
||||
|
||||
Face( FaceObserver* observer ) :
|
||||
m_refcount( 0 ),
|
||||
m_shader( texdef_name_default() ),
|
||||
|
|
@ -1704,7 +1705,7 @@ public:
|
|||
}
|
||||
|
||||
// assignment not supported
|
||||
Brush& operator=( const Brush& other );
|
||||
Brush& operator=( const Brush& other ) = delete;
|
||||
|
||||
void setDoom3GroupOrigin( const Vector3& origin ){
|
||||
//globalOutputStream() << "func_static origin before: " << m_funcStaticOrigin << " after: " << origin << "\n";
|
||||
|
|
@ -3425,9 +3426,6 @@ class BrushInstance :
|
|||
const LightList* m_lightList;
|
||||
|
||||
BrushTransformModifier m_transform;
|
||||
|
||||
BrushInstance( const BrushInstance& other ); // NOT COPYABLE
|
||||
BrushInstance& operator=( const BrushInstance& other ); // NOT ASSIGNABLE
|
||||
public:
|
||||
static Counter* m_counter;
|
||||
|
||||
|
|
@ -3440,6 +3438,9 @@ public:
|
|||
|
||||
STRING_CONSTANT( Name, "BrushInstance" );
|
||||
|
||||
BrushInstance( const BrushInstance& other ) = delete; // NOT COPYABLE
|
||||
BrushInstance& operator=( const BrushInstance& other ) = delete; // NOT ASSIGNABLE
|
||||
|
||||
BrushInstance( const scene::Path& path, scene::Instance* parent, Brush& brush ) :
|
||||
Instance( path, parent, this, StaticTypeCasts::instance().get() ),
|
||||
m_brush( brush ),
|
||||
|
|
|
|||
|
|
@ -120,12 +120,12 @@ void setGridPower( GridPower power );
|
|||
class GridMenuItem
|
||||
{
|
||||
GridPower m_id;
|
||||
|
||||
GridMenuItem( const GridMenuItem& other ); // NOT COPYABLE
|
||||
GridMenuItem& operator=( const GridMenuItem& other ); // NOT ASSIGNABLE
|
||||
public:
|
||||
ToggleItem m_item;
|
||||
|
||||
GridMenuItem( const GridMenuItem& other ) = delete; // NOT COPYABLE
|
||||
GridMenuItem& operator=( const GridMenuItem& other ) = delete; // NOT ASSIGNABLE
|
||||
|
||||
GridMenuItem( GridPower id ) : m_id( id ), m_item( ExportCaller( *this ) ){
|
||||
}
|
||||
void set(){
|
||||
|
|
|
|||
|
|
@ -97,8 +97,6 @@ class NameObserver
|
|||
m_names.erase( name_read( c_str() ) );
|
||||
}
|
||||
}
|
||||
|
||||
NameObserver& operator=( const NameObserver& other );
|
||||
public:
|
||||
NameObserver( UniqueNames& names ) : m_names( names ){
|
||||
construct();
|
||||
|
|
@ -106,6 +104,7 @@ public:
|
|||
NameObserver( const NameObserver& other ) : m_names( other.m_names ), m_name( other.m_name ){
|
||||
construct();
|
||||
}
|
||||
NameObserver& operator=( const NameObserver& other ) = delete; // not assignable
|
||||
~NameObserver(){
|
||||
destroy();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -351,9 +351,9 @@ struct ModelResource : public Resource
|
|||
ASSERT_MESSAGE( !realised(), "ModelResource::~ModelResource: resource reference still realised: " << makeQuoted( m_name.c_str() ) );
|
||||
}
|
||||
// NOT COPYABLE
|
||||
ModelResource( const ModelResource& );
|
||||
ModelResource( const ModelResource& ) = delete;
|
||||
// NOT ASSIGNABLE
|
||||
ModelResource& operator=( const ModelResource& );
|
||||
ModelResource& operator=( const ModelResource& ) = delete;
|
||||
|
||||
void setModel( const NodeSmartReference& model ){
|
||||
m_model = model;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user