1
0
forked from 0ad/0ad

Makes some classes NONCOPYABLE, based on patch by Markus, refs #1852

This was SVN commit r13419.
This commit is contained in:
historic_bruno 2013-05-22 21:40:56 +00:00
parent d7dcd3b26c
commit 94c57085e9
15 changed files with 46 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2012 Wildfire Games. /* Copyright (C) 2013 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@ -26,6 +26,8 @@ class MD5;
class CColladaManager class CColladaManager
{ {
NONCOPYABLE(CColladaManager);
public: public:
enum FileType { PMD, PSA }; enum FileType { PMD, PSA };

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2011 Wildfire Games. /* Copyright (C) 2013 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@ -36,6 +36,7 @@ class CMapGeneratorWorker;
*/ */
class CMapGenerator class CMapGenerator
{ {
NONCOPYABLE(CMapGenerator);
public: public:
CMapGenerator(); CMapGenerator();

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games. /* Copyright (C) 2013 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@ -70,6 +70,8 @@ class CTextureManagerImpl;
*/ */
class CTextureManager class CTextureManager
{ {
NONCOPYABLE(CTextureManager);
public: public:
/** /**
* Construct texture manager. vfs must be the VFS instance used for all textures * Construct texture manager. vfs must be the VFS instance used for all textures

View File

@ -96,6 +96,8 @@ class GUITooltip;
*/ */
class CGUI class CGUI
{ {
NONCOPYABLE(CGUI);
friend class IGUIObject; friend class IGUIObject;
friend class IGUIScrollBarOwner; friend class IGUIScrollBarOwner;
friend class CInternalCGUIAccessorBase; friend class CInternalCGUIAccessorBase;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2009 Wildfire Games. /* Copyright (C) 2013 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@ -32,6 +32,8 @@
class Noise2D class Noise2D
{ {
NONCOPYABLE(Noise2D);
/// Frequency in X and Y /// Frequency in X and Y
int freq; int freq;
@ -47,6 +49,8 @@ public:
class Noise3D class Noise3D
{ {
NONCOPYABLE(Noise3D);
/// Frequency in X and Y /// Frequency in X and Y
int freq; int freq;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2009 Wildfire Games. /* Copyright (C) 2013 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@ -40,6 +40,9 @@ namespace JSI_Vector3D
struct Vector3D_Info struct Vector3D_Info
{ {
NONCOPYABLE(Vector3D_Info);
public:
IPropertyOwner* owner; IPropertyOwner* owner;
void (IPropertyOwner::*updateFn)(); void (IPropertyOwner::*updateFn)();
void (IPropertyOwner::*freshenFn)(); void (IPropertyOwner::*freshenFn)();

View File

@ -51,6 +51,8 @@ class CTextRenderer;
*/ */
class CConsole class CConsole
{ {
NONCOPYABLE(CConsole);
public: public:
CConsole(); CConsole();
~CConsole(); ~CConsole();

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2011 Wildfire Games. /* Copyright (C) 2013 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@ -40,6 +40,8 @@ class CStrW;
class CProfileNode class CProfileNode
{ {
NONCOPYABLE(CProfileNode);
friend class CProfileManager; friend class CProfileManager;
friend class CProfileNodeTable; friend class CProfileNodeTable;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2012 Wildfire Games. /* Copyright (C) 2013 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@ -34,6 +34,8 @@ struct OverlayRendererInternals;
*/ */
class OverlayRenderer class OverlayRenderer
{ {
NONCOPYABLE(OverlayRenderer);
public: public:
OverlayRenderer(); OverlayRenderer();
~OverlayRenderer(); ~OverlayRenderer();

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2011 Wildfire Games. /* Copyright (C) 2013 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@ -29,6 +29,8 @@ struct ParticleRendererInternals;
*/ */
class ParticleRenderer class ParticleRenderer
{ {
NONCOPYABLE(ParticleRenderer);
public: public:
ParticleRenderer(); ParticleRenderer();
~ParticleRenderer(); ~ParticleRenderer();

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2012 Wildfire Games. /* Copyright (C) 2013 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@ -39,6 +39,8 @@
*/ */
class CVertexBuffer class CVertexBuffer
{ {
NONCOPYABLE(CVertexBuffer);
public: public:
/// VBChunk: describes a portion of this vertex buffer /// VBChunk: describes a portion of this vertex buffer

View File

@ -129,6 +129,9 @@ struct trapLocation
struct ThreadDebugger_impl struct ThreadDebugger_impl
{ {
NONCOPYABLE(ThreadDebugger_impl);
public:
ThreadDebugger_impl(); ThreadDebugger_impl();
~ThreadDebugger_impl(); ~ThreadDebugger_impl();

View File

@ -41,6 +41,8 @@ CSoundManager* g_SoundManager = NULL;
class CSoundManagerWorker class CSoundManagerWorker
{ {
NONCOPYABLE(CSoundManagerWorker);
public: public:
CSoundManagerWorker() CSoundManagerWorker()
{ {

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2012 Wildfire Games. /* Copyright (C) 2013 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@ -50,6 +50,8 @@ struct ALSourceHolder
class CSoundManager class CSoundManager
{ {
NONCOPYABLE(CSoundManager);
protected: protected:
ALuint m_ALEnvironment; ALuint m_ALEnvironment;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2011 Wildfire Games. /* Copyright (C) 2013 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@ -42,6 +42,10 @@ public:
struct ToolManagerImpl; struct ToolManagerImpl;
class ToolManager class ToolManager
{ {
private: // NONCOPYABLE
ToolManager(const ToolManager&);
const ToolManager& operator=(const ToolManager&);
public: public:
ToolManager(ScenarioEditor* scenarioEditor); ToolManager(ScenarioEditor* scenarioEditor);
~ToolManager(); ~ToolManager();