1
0
forked from 0ad/0ad

Use NONCOPYABLE macro, to avoid ICC warnings

This was SVN commit r6589.
This commit is contained in:
Ykkrosh 2009-01-03 18:40:28 +00:00
parent d0250b2bbc
commit b51353ae0b
24 changed files with 65 additions and 38 deletions

View File

@ -54,8 +54,9 @@ const float CGameView::defaultFOV = DEGTORAD(20.f);
const float CGameView::defaultNear = 4.f;
const float CGameView::defaultFar = 4096.f;
class CGameViewImpl : public CJSObject<CGameViewImpl>, noncopyable
class CGameViewImpl : public CJSObject<CGameViewImpl>
{
NONCOPYABLE(CGameViewImpl);
public:
CGameViewImpl(CGame* game)
: Game(game),

View File

@ -21,8 +21,9 @@ struct JSObject;
class CGameViewImpl;
class CGameView : private Scene, public noncopyable
class CGameView : private Scene
{
NONCOPYABLE(CGameView);
public:
static const float defaultFOV, defaultNear, defaultFar;

View File

@ -239,8 +239,9 @@ int CMapReader::ApplyData()
// Holds various state data while reading maps, so that loading can be
// interrupted (e.g. to update the progress display) then later resumed.
class CXMLReader : noncopyable
class CXMLReader
{
NONCOPYABLE(CXMLReader);
public:
CXMLReader(const CStr& xml_filename, CMapReader& mapReader)
: m_MapReader(mapReader)

View File

@ -11,8 +11,9 @@ typedef shared_ptr<CModelDef> CModelDefPtr;
class CColladaManager;
class CMeshManager : noncopyable
class CMeshManager
{
NONCOPYABLE(CMeshManager);
public:
CMeshManager(CColladaManager& colladaManager);
~CMeshManager();

View File

@ -28,8 +28,10 @@ class CSkeletonAnimManager;
///////////////////////////////////////////////////////////////////////////////
// CModel: basically, a mesh object - holds the texturing and skinning
// information for a model in game
class CModel : public CRenderableObject, noncopyable
class CModel : public CRenderableObject
{
NONCOPYABLE(CModel);
friend class CUnitAnimation;
// HACK - we should probably move the rest of this class's animation state
// into the animation class, then it wouldn't need friend access

View File

@ -10,8 +10,9 @@ class CObjectManager;
#include <map>
#include "ps/CStr.h"
class CObjectBase : noncopyable
class CObjectBase
{
NONCOPYABLE(CObjectBase);
public:
struct Anim {

View File

@ -15,8 +15,9 @@ class CSkeletonAnimManager;
///////////////////////////////////////////////////////////////////////////////////////////
// CObjectManager: manager class for all possible actor types
class CObjectManager : noncopyable
class CObjectManager
{
NONCOPYABLE(CObjectManager);
public:
struct ObjectKey
{

View File

@ -19,8 +19,9 @@ class CStr8;
///////////////////////////////////////////////////////////////////////////////
// CSkeletonAnimManager : owner class of all skeleton anims - manages creation,
// loading and destruction of animation data
class CSkeletonAnimManager : noncopyable
class CSkeletonAnimManager
{
NONCOPYABLE(CSkeletonAnimManager);
public:
// constructor, destructor
CSkeletonAnimManager(CColladaManager& colladaManager);

View File

@ -22,8 +22,9 @@ const size_t invalidUnitId = ~size_t(0);
/////////////////////////////////////////////////////////////////////////////////////////////
// CUnit: simple "actor" definition - defines a sole object within the world
class CUnit : noncopyable
class CUnit
{
NONCOPYABLE(CUnit);
private:
// Private constructor. Needs complete list of selections for the variation.
CUnit(CObjectEntry* object, CEntity* entity, CObjectManager& objectManager,

View File

@ -5,8 +5,9 @@
class CUnit;
class CUnitAnimation : noncopyable
class CUnitAnimation
{
NONCOPYABLE(CUnitAnimation);
public:
CUnitAnimation(CUnit& unit);

View File

@ -27,8 +27,9 @@ namespace I18n
};
class TSComponentString : public TSComponent, noncopyable
class TSComponentString : public TSComponent
{
NONCOPYABLE(TSComponentString);
public:
TSComponentString(const wchar_t* s) : String(s) {}
@ -39,8 +40,9 @@ namespace I18n
};
class TSComponentVariable : public TSComponent, noncopyable
class TSComponentVariable : public TSComponent
{
NONCOPYABLE(TSComponentVariable);
public:
TSComponentVariable(unsigned char id) : ID(id) {}
@ -51,8 +53,9 @@ namespace I18n
};
class TSComponentFunction : public TSComponent, noncopyable
class TSComponentFunction : public TSComponent
{
NONCOPYABLE(TSComponentFunction);
public:
TSComponentFunction(const char* name) : Name(name) {}
~TSComponentFunction();

View File

@ -12,8 +12,9 @@ extern CLogger* g_Logger;
#define LOG (g_Logger->Log)
#define LOG_ONCE (g_Logger->LogOnce)
class CLogger : noncopyable
class CLogger
{
NONCOPYABLE(CLogger);
public:
enum ELogMethod
{
@ -72,8 +73,9 @@ private:
* Helper class for unit tests - captures all log output while it is in scope,
* and returns it as a single string.
*/
class TestLogger : noncopyable
class TestLogger
{
NONCOPYABLE(TestLogger);
public:
TestLogger();
~TestLogger();

View File

@ -29,8 +29,9 @@ class CGameAttributes;
* a set of attributes provided. The CGame object is also responsible for
* maintaining the relations between CPlayer and CWorld, CSimulation and CWorld.
**/
class CGame : noncopyable
class CGame
{
NONCOPYABLE(CGame);
/**
* pointer to the CWorld object representing the game world.
**/

View File

@ -24,8 +24,10 @@ static bool ldr_was_interrupted(int ret)
return (0 < ret && ret <= 100);
}
template<class T> struct MemFun_t : noncopyable
template<class T> struct MemFun_t
{
NONCOPYABLE(MemFun_t);
public:
T* const this_;
int (T::*func)(void);
MemFun_t(T* this__, int(T::*func_)(void))
@ -53,8 +55,10 @@ template<class T> void RegMemFun(T* this_, int(T::*func)(void),
////////////////////////////////////////////////////////
template<class T, class Arg> struct MemFun1_t : noncopyable
template<class T, class Arg> struct MemFun1_t
{
NONCOPYABLE(MemFun1_t);
public:
T* const this_;
Arg arg;
int (T::*func)(Arg);

View File

@ -135,8 +135,9 @@ public:
// CScopeLock
// ---------------------------------------------------------------------| Class
// Locks a CMutex over the objects lifetime
class CScopeLock : noncopyable
class CScopeLock
{
NONCOPYABLE(CScopeLock);
public:
inline CScopeLock(pthread_mutex_t &mutex): m_Mutex(mutex)
{

View File

@ -29,8 +29,9 @@ class CTerrain;
* CWorld is a general data class containing whatever is needed to accurately represent the world.
* This includes the map, entities, influence maps, tiles, heightmap, etc.
**/
class CWorld : noncopyable
class CWorld
{
NONCOPYABLE(CWorld);
/**
* pointer to the CGame object representing the game.
**/

View File

@ -65,8 +65,9 @@
* Accesses CRenderer::m_Stats by keeping the reference passed to the
* constructor.
*/
class CRendererStatsTable : public AbstractProfileTable, noncopyable
class CRendererStatsTable : public AbstractProfileTable
{
NONCOPYABLE(CRendererStatsTable);
public:
CRendererStatsTable(const CRenderer::Stats& st);
@ -187,8 +188,10 @@ enum {
* Struct CRendererInternals: Truly hide data that is supposed to be hidden
* in this structure so it won't even appear in header files.
*/
struct CRendererInternals : public noncopyable
struct CRendererInternals
{
NONCOPYABLE(CRendererInternals);
public:
/// true if CRenderer::Open has been called
bool IsOpen;

View File

@ -74,8 +74,10 @@ enum EntityFlags
// TODO MT: Put this is /some/ sort of order...
class CEntity : public CJSComplex<CEntity>, public IEventTarget, noncopyable
class CEntity : public CJSComplex<CEntity>, public IEventTarget
{
NONCOPYABLE(CEntity);
friend class CEntityManager;
friend class CUnit;

View File

@ -27,8 +27,9 @@ class CPlayer;
class CXeromyces;
class XMBElement;
class CEntityTemplate : public CJSComplex<CEntityTemplate>, public IEventTarget, noncopyable
class CEntityTemplate : public CJSComplex<CEntityTemplate>, public IEventTarget
{
NONCOPYABLE(CEntityTemplate);
public:
CPlayer* m_player; // Which player this template is for, or null for the no-player template
// used to read unmodified values for upgrades and such.

View File

@ -30,12 +30,11 @@ enum EPathType
};
class CPathfindEngine : public Singleton<CPathfindEngine>, noncopyable
class CPathfindEngine : public Singleton<CPathfindEngine>
{
NONCOPYABLE(CPathfindEngine);
public:
//Kai: added for dcdt
const float OABBBOUNDREDUCTION ;
const float CIRCLEBOUNDREDUCTION ;

View File

@ -18,6 +18,8 @@ class CEntity;
class CTechnology : public CJSComplex<CTechnology>
{
NONCOPYABLE(CTechnology);
friend class CTechnologyCollection;
struct Modifier
@ -33,13 +35,6 @@ public:
CTechnology(const CStrW& name, CPlayer* player);
~CTechnology() {}
// noncopyable (avoid VC7.1 warning); don't derive from
// noncopyable, so that multiple inheritance is avoided
private:
CTechnology(const CTechnology&);
const CTechnology& operator=(const CTechnology&);
public:
//JS functions
static void ScriptingInit();
bool ApplyEffects( JSContext* cx, uintN argc, jsval* argv );

View File

@ -24,8 +24,10 @@
#include "renderer/Scene.h"
#include "renderer/SkyManager.h"
struct ActorViewerImpl : public Scene, noncopyable
struct ActorViewerImpl : public Scene
{
NONCOPYABLE(ActorViewerImpl);
public:
ActorViewerImpl()
: Unit(NULL), ColladaManager(), MeshManager(ColladaManager), SkeletonAnimManager(ColladaManager),
ObjectManager(MeshManager, SkeletonAnimManager)

View File

@ -6,8 +6,9 @@ struct SColor4ub;
class CUnit;
class CStrW;
class ActorViewer : noncopyable
class ActorViewer
{
NONCOPYABLE(ActorViewer);
public:
ActorViewer();
~ActorViewer();

View File

@ -4,8 +4,9 @@
#include "ps/CStr.h"
#include <queue>
class MessagePasserImpl : public AtlasMessage::MessagePasser, noncopyable
class MessagePasserImpl : public AtlasMessage::MessagePasser
{
NONCOPYABLE(MessagePasserImpl);
public:
MessagePasserImpl();
~MessagePasserImpl();