Skip to content

Commit

Permalink
Made the respective Array statics const.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexBx committed Jun 16, 2015
1 parent 10ca496 commit c441e96
Show file tree
Hide file tree
Showing 43 changed files with 45 additions and 45 deletions.
4 changes: 2 additions & 2 deletions AbstractTypeClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CCINIClass;

//Macro for the static Array of every AbstractTypeClass!
#define ABSTRACTTYPE_ARRAY(class_name) public:\
static DynamicVectorClass<class_name*>* Array;\
static DynamicVectorClass<class_name*>* const Array;\
static class_name* Find(const char* pID)\
{\
for(auto pItem : *Array)\
Expand Down Expand Up @@ -44,7 +44,7 @@ class NOVTABLE AbstractTypeClass : public AbstractClass
static const AbstractType AbsID = AbstractType::Abstract;

//Static
static DynamicVectorClass<AbstractTypeClass*>* Array;
static DynamicVectorClass<AbstractTypeClass*>* const Array;

//Destructor
virtual ~AbstractTypeClass() RX;
Expand Down
2 changes: 1 addition & 1 deletion AircraftClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class NOVTABLE AircraftClass : public FootClass, public FlasherClass
static const AbstractType AbsID = AbstractType::Aircraft;

//Static
static DynamicVectorClass<AircraftClass*>* Array;
static DynamicVectorClass<AircraftClass*>* const Array;

//IFlyControl
virtual int __stdcall Landing_Altitude() R0;
Expand Down
2 changes: 1 addition & 1 deletion AlphaShapeClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class NOVTABLE AlphaShapeClass : public AbstractClass
static const AbstractType AbsID = AbstractType::AlphaShape;

//Static
static DynamicVectorClass<AlphaShapeClass*>* Array;
static DynamicVectorClass<AlphaShapeClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion AnimClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class NOVTABLE AnimClass : public ObjectClass
static const AbstractType AbsID = AbstractType::Anim;

//Static
static DynamicVectorClass<AnimClass*>* Array;
static DynamicVectorClass<AnimClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion BuildingClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class NOVTABLE BuildingClass : public TechnoClass
static const AbstractType AbsID = AbstractType::Building;

//Static
static DynamicVectorClass<BuildingClass*>* Array;
static DynamicVectorClass<BuildingClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion BuildingLightClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class NOVTABLE BuildingLightClass : public ObjectClass
static const AbstractType AbsID = AbstractType::BuildingLight;

//Static
static DynamicVectorClass<BuildingLightClass*>* Array;
static DynamicVectorClass<BuildingLightClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion BulletClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class NOVTABLE BulletClass : public ObjectClass
static const AbstractType AbsID = AbstractType::Bullet;

//Array
static DynamicVectorClass<BulletClass*>* Array;
static DynamicVectorClass<BulletClass*>* const Array;

static DynamicVectorClass<BulletClass*>& ScalableBullets;

Expand Down
2 changes: 1 addition & 1 deletion CaptureManagerClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class NOVTABLE CaptureManagerClass : public AbstractClass
{
public:

static DynamicVectorClass<CaptureManagerClass *>* Array;
static DynamicVectorClass<CaptureManagerClass *>* const Array;

static const AbstractType AbsID = AbstractType::CaptureManager;

Expand Down
2 changes: 1 addition & 1 deletion ColorScheme.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ColorScheme
};

//global array
static DynamicVectorClass<ColorScheme*>* Array;
static DynamicVectorClass<ColorScheme*>* const Array;
/*
* trap! most schemes are duplicated - ShadeCount 1 and ShadeCount 53
*/
Expand Down
2 changes: 1 addition & 1 deletion CommandClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class NOVTABLE CommandClass
{
public:
// static
static DynamicVectorClass<CommandClass*>* Array;
static DynamicVectorClass<CommandClass*>* const Array;

//CommandClass
virtual ~CommandClass() = default;
Expand Down
4 changes: 2 additions & 2 deletions ConvertClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ConvertClass
{
public:
//global array
static DynamicVectorClass<ConvertClass*>* Array;
static DynamicVectorClass<ConvertClass*>* const Array;

static ConvertClass* FindOrAllocate(const char * FileName);

Expand Down Expand Up @@ -84,7 +84,7 @@ class LightConvertClass : public ConvertClass
{
public:
//global array
static DynamicVectorClass<LightConvertClass*>* Array;
static DynamicVectorClass<LightConvertClass*>* const Array;



Expand Down
2 changes: 1 addition & 1 deletion EBolt.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class UnitClass;
class EBolt
{
public:
static DynamicVectorClass<EBolt*>* Array;
static DynamicVectorClass<EBolt*>* const Array;

//Constructor, Destructor
EBolt()
Expand Down
2 changes: 1 addition & 1 deletion EMPulseClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class NOVTABLE EMPulseClass : public AbstractClass
static const AbstractType AbsID = AbstractType::EMPulse;

//Static
static DynamicVectorClass<EMPulseClass*>* Array;
static DynamicVectorClass<EMPulseClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion FactoryClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class NOVTABLE FactoryClass : public AbstractClass
public:
static const AbstractType AbsID = AbstractType::Factory;

static DynamicVectorClass<FactoryClass *> *Array;
static DynamicVectorClass<FactoryClass *> * const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion FootClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class NOVTABLE FootClass : public TechnoClass
public:
static const auto AbsDerivateID = AbstractFlags::Foot;

static DynamicVectorClass<FootClass *>* Array;
static DynamicVectorClass<FootClass *>* const Array;

//IPersistStream
//Destructor
Expand Down
2 changes: 1 addition & 1 deletion HouseClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class NOVTABLE HouseClass : public AbstractClass, public IHouse, public IPublicH
enum {PlayerAtA = 4475, PlayerAtB, PlayerAtC, PlayerAtD, PlayerAtE, PlayerAtF, PlayerAtG, PlayerAtH};

//Static
static DynamicVectorClass<HouseClass*>* Array;
static DynamicVectorClass<HouseClass*>* const Array;

static HouseClass *&Player;
static HouseClass *&Observer;
Expand Down
2 changes: 1 addition & 1 deletion InfantryClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class NOVTABLE InfantryClass : public FootClass
static const AbstractType AbsID = AbstractType::Infantry;

//Static
static DynamicVectorClass<InfantryClass*>* Array;
static DynamicVectorClass<InfantryClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion IonBlastClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class IonBlastClass
{
public:
static DynamicVectorClass<IonBlastClass *>* Array;
static DynamicVectorClass<IonBlastClass *>* const Array;

static void UpdateAll()
{ JMP_STD(0x53D310); }
Expand Down
2 changes: 1 addition & 1 deletion IsometricTileTypeClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class NOVTABLE IsometricTileTypeClass : public ObjectTypeClass
static const AbstractType AbsID = AbstractType::IsotileType;

//Array
static DynamicVectorClass<IsometricTileTypeClass*>* Array;
static DynamicVectorClass<IsometricTileTypeClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion LineTrail.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct LineTrailNode
class LineTrail
{
public:
static DynamicVectorClass<LineTrail*>* Array;
static DynamicVectorClass<LineTrail*>* const Array;

//Constructor, Destructor
LineTrail()
Expand Down
2 changes: 1 addition & 1 deletion MixFileClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class MixFileClass : public Node<MixFileClass*>

public:
static List<MixFileClass*>* MIXes;
static DynamicVectorClass<MixFileClass*>* Array;
static DynamicVectorClass<MixFileClass*>* const Array;
static DynamicVectorClass<MixFileClass*>* Array_Alt;
static DynamicVectorClass<MixFileClass*>* Maps;
static DynamicVectorClass<MixFileClass*>* Movies;
Expand Down
2 changes: 1 addition & 1 deletion OverlayClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class NOVTABLE OverlayClass : public ObjectClass
static const AbstractType AbsID = AbstractType::Overlay;

//Static
static DynamicVectorClass<OverlayClass*>* Array;
static DynamicVectorClass<OverlayClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion ParasiteClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class NOVTABLE ParasiteClass : public AbstractClass
public:
static const AbstractType AbsID = AbstractType::Parasite;

static DynamicVectorClass<ParasiteClass*>* Array;
static DynamicVectorClass<ParasiteClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion ParticleClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class NOVTABLE ParticleClass : public ObjectClass
static const AbstractType AbsID = AbstractType::Particle;

//Static
static DynamicVectorClass<ParticleClass*>* Array;
static DynamicVectorClass<ParticleClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion ParticleSystemClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class NOVTABLE ParticleSystemClass : public ObjectClass
static const AbstractType AbsID = AbstractType::ParticleSystem;

//Static
static DynamicVectorClass<ParticleSystemClass*>* Array;
static DynamicVectorClass<ParticleSystemClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion RadBeam.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class TechnoClass;
class RadBeam
{
public:
static DynamicVectorClass<RadBeam*>* Array;
static DynamicVectorClass<RadBeam*>* const Array;

// Constructor removed - do not use it, use Allocate instead

Expand Down
2 changes: 1 addition & 1 deletion RadSiteClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class NOVTABLE RadSiteClass : public AbstractClass
static const AbstractType AbsID = AbstractType::RadSite;

//Static
static DynamicVectorClass<RadSiteClass*>* Array;
static DynamicVectorClass<RadSiteClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion SlaveManagerClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class NOVTABLE SlaveManagerClass : public AbstractClass
TimerStruct RespawnTimer;
};

static DynamicVectorClass<SlaveManagerClass *>* Array;
static DynamicVectorClass<SlaveManagerClass *>* const Array;

static const AbstractType AbsID = AbstractType::SlaveManager;

Expand Down
2 changes: 1 addition & 1 deletion SmudgeClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class NOVTABLE SmudgeClass : public ObjectClass
static const AbstractType AbsID = AbstractType::Smudge;

//Static
static DynamicVectorClass<SmudgeClass*>* Array;
static DynamicVectorClass<SmudgeClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion SpawnManagerClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class NOVTABLE SpawnManagerClass : public AbstractClass
{
public:

static DynamicVectorClass<SpawnManagerClass *>* Array;
static DynamicVectorClass<SpawnManagerClass *>* const Array;

static const AbstractType AbsID = AbstractType::SpawnManager;

Expand Down
2 changes: 1 addition & 1 deletion SpotlightClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class SpotlightClass
{
public:
//Static
static DynamicVectorClass<SpotlightClass*>* Array;
static DynamicVectorClass<SpotlightClass*>* const Array;

//Destructor
~SpotlightClass()
Expand Down
2 changes: 1 addition & 1 deletion StaticInits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//include <VTables.h>

#define DECL(cls, adr) \
DynamicVectorClass<cls*>* cls::Array = \
DynamicVectorClass<cls*>* const cls::Array = \
reinterpret_cast<DynamicVectorClass<cls*>*>(adr);

#define ALIAS(Type, Obj, Addr) \
Expand Down
2 changes: 1 addition & 1 deletion SuperClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class NOVTABLE SuperClass : public AbstractClass
static const AbstractType AbsID = AbstractType::Super;

//Static
static DynamicVectorClass<SuperClass*>* Array;
static DynamicVectorClass<SuperClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion TActionClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class NOVTABLE TActionClass : public AbstractClass
static const AbstractType AbsID = AbstractType::Action;

//Static
static DynamicVectorClass<TActionClass*>* Array;
static DynamicVectorClass<TActionClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion TEventClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class NOVTABLE TEventClass : public AbstractClass
static const AbstractType AbsID = AbstractType::Event;

//Static
static DynamicVectorClass<TEventClass*>* Array;
static DynamicVectorClass<TEventClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion TagClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class NOVTABLE TagClass : public AbstractClass
static const AbstractType AbsID = AbstractType::Tag;

//Static
static DynamicVectorClass<TagClass*>* Array;
static DynamicVectorClass<TagClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion TeamClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class NOVTABLE TeamClass : public AbstractClass
static const AbstractType AbsID = AbstractType::Team;

//Static
static DynamicVectorClass<TeamClass*>* Array;
static DynamicVectorClass<TeamClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion TemporalClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class NOVTABLE TemporalClass : public AbstractClass
static const AbstractType AbsID = AbstractType::Temporal;

//Static
static DynamicVectorClass<TemporalClass*>* Array;
static DynamicVectorClass<TemporalClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion UnitClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class NOVTABLE UnitClass : public FootClass
static const AbstractType AbsID = AbstractType::Unit;

//Static
static DynamicVectorClass<UnitClass*>* Array;
static DynamicVectorClass<UnitClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
2 changes: 1 addition & 1 deletion VocClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct VolumeStruct //pretty uncreative name, but it's all I can come up with at
class VocClass
{
public:
static DynamicVectorClass<VocClass*>* Array;
static DynamicVectorClass<VocClass*>* const Array;
static VocClass* Find(const char* pName)
{
for(int i = 0; i < Array->Count; ++i) {
Expand Down
2 changes: 1 addition & 1 deletion VoxClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class VoxClass
{
public:
static DynamicVectorClass<VoxClass*>* Array;
static DynamicVectorClass<VoxClass*>* const Array;
static int &EVAIndex;

static VoxClass* Find(const char* pName)
Expand Down
2 changes: 1 addition & 1 deletion VoxelAnimClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class NOVTABLE VoxelAnimClass : public ObjectClass
static const AbstractType AbsID = AbstractType::VoxelAnim;

//Static
static DynamicVectorClass<VoxelAnimClass*>* Array;
static DynamicVectorClass<VoxelAnimClass*>* const Array;

//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
Expand Down
Loading

0 comments on commit c441e96

Please sign in to comment.