Skip to content

Commit

Permalink
Remove MANGOS_DLL_DECL and its use
Browse files Browse the repository at this point in the history
This define is always empty and therefore useless.

See cmangos/issues#402 for details.

Signed-off-by: stfx <stfx@hotmail.de>
  • Loading branch information
evil-at-wow authored and DomGries committed Dec 1, 2014
1 parent f4b2204 commit 5267ab5
Show file tree
Hide file tree
Showing 30 changed files with 76 additions and 90 deletions.
2 changes: 1 addition & 1 deletion src/bindings/universal/ScriptMgr.h
Expand Up @@ -85,7 +85,7 @@ struct Script
#define VISIBLE_RANGE (50.0f)

// Read function descriptions in CreatureAI
struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI
struct ScriptedAI : public CreatureAI
{
explicit ScriptedAI(Creature* creature) : CreatureAI(creature) {}
~ScriptedAI() {}
Expand Down
2 changes: 1 addition & 1 deletion src/framework/Dynamic/FactoryHolder.h
Expand Up @@ -27,7 +27,7 @@
/** FactoryHolder holds a factory object of a specific type
*/
template<class T, class Key = std::string>
class MANGOS_DLL_DECL FactoryHolder
class FactoryHolder
{
public:
typedef ObjectRegistry<FactoryHolder<T, Key >, Key > FactoryHolderRegistry;
Expand Down
2 changes: 1 addition & 1 deletion src/framework/Dynamic/ObjectRegistry.h
Expand Up @@ -30,7 +30,7 @@
/** ObjectRegistry holds all registry item of the same type
*/
template<class T, class Key = std::string>
class MANGOS_DLL_DECL ObjectRegistry
class ObjectRegistry
{
public:
typedef std::map<Key, T*> RegistryMapType;
Expand Down
2 changes: 1 addition & 1 deletion src/framework/GameSystem/Grid.h
Expand Up @@ -44,7 +44,7 @@ class ACTIVE_OBJECT,
class WORLD_OBJECT_TYPES,
class GRID_OBJECT_TYPES
>
class MANGOS_DLL_DECL Grid
class Grid
{
// allows the GridLoader to access its internals
template<class A, class T, class O> friend class GridLoader;
Expand Down
2 changes: 1 addition & 1 deletion src/framework/GameSystem/GridLoader.h
Expand Up @@ -40,7 +40,7 @@ class ACTIVE_OBJECT,
class WORLD_OBJECT_TYPES,
class GRID_OBJECT_TYPES
>
class MANGOS_DLL_DECL GridLoader
class GridLoader
{
public:

Expand Down
2 changes: 1 addition & 1 deletion src/framework/GameSystem/NGrid.h
Expand Up @@ -80,7 +80,7 @@ uint32 N,
class WORLD_OBJECT_TYPES,
class GRID_OBJECT_TYPES
>
class MANGOS_DLL_DECL NGrid
class NGrid
{
public:

Expand Down
2 changes: 1 addition & 1 deletion src/framework/GameSystem/TypeContainer.h
Expand Up @@ -206,7 +206,7 @@ struct ContainerMapList<TypeList<H, T> >
*/

template<class OBJECT_TYPES>
class MANGOS_DLL_DECL TypeMapContainer
class TypeMapContainer
{
public:

Expand Down
2 changes: 1 addition & 1 deletion src/framework/GameSystem/TypeContainerVisitor.h
Expand Up @@ -66,7 +66,7 @@ void VisitorHelper(VISITOR& v, TypeMapContainer<OBJECT_TYPES>& c)
}

template<class VISITOR, class TYPE_CONTAINER>
class MANGOS_DLL_DECL TypeContainerVisitor
class TypeContainerVisitor
{
public:

Expand Down
14 changes: 0 additions & 14 deletions src/framework/Platform/Define.h
Expand Up @@ -64,20 +64,6 @@ typedef ACE_SHLIB_HANDLE MANGOS_LIBRARY_HANDLE;
# endif //__APPLE_CC__ && BIG_ENDIAN
#endif // PLATFORM

#if PLATFORM == PLATFORM_WINDOWS
# ifdef MANGOS_WIN32_DLL_IMPORT
# define MANGOS_DLL_DECL __declspec(dllimport)
# else //!MANGOS_WIN32_DLL_IMPORT
# ifdef MANGOS_WIND_DLL_EXPORT
# define MANGOS_DLL_DECL __declspec(dllexport)
# else //!MANGOS_WIND_DLL_EXPORT
# define MANGOS_DLL_DECL
# endif // MANGOS_WIND_DLL_EXPORT
# endif // MANGOS_WIN32_DLL_IMPORT
#else // PLATFORM != PLATFORM_WINDOWS
# define MANGOS_DLL_DECL
#endif // PLATFORM

#if PLATFORM == PLATFORM_WINDOWS
# define MANGOS_DLL_SPEC __declspec(dllexport)
# ifndef DECLSPEC_NORETURN
Expand Down
8 changes: 4 additions & 4 deletions src/framework/Policies/CreationPolicy.h
Expand Up @@ -28,7 +28,7 @@ namespace MaNGOS
* OperatorNew policy creates an object on the heap using new.
*/
template<class T>
class MANGOS_DLL_DECL OperatorNew
class OperatorNew
{
public:

Expand All @@ -48,7 +48,7 @@ namespace MaNGOS
* the first time call Create.
*/
template<class T>
class MANGOS_DLL_DECL LocalStaticCreation
class LocalStaticCreation
{
union MaxAlign
{
Expand Down Expand Up @@ -82,7 +82,7 @@ namespace MaNGOS
* CreateUsingMalloc by pass the memory manger.
*/
template<class T>
class MANGOS_DLL_DECL CreateUsingMalloc
class CreateUsingMalloc
{
public:

Expand All @@ -107,7 +107,7 @@ namespace MaNGOS
* CreateOnCallBack creates the object base on the call back.
*/
template<class T, class CALL_BACK>
class MANGOS_DLL_DECL CreateOnCallBack
class CreateOnCallBack
{
public:
static T* Create()
Expand Down
2 changes: 1 addition & 1 deletion src/framework/Policies/ObjectLifeTime.h
Expand Up @@ -29,7 +29,7 @@ namespace MaNGOS
void MANGOS_DLL_SPEC at_exit(void (*func)());

template<class T>
class MANGOS_DLL_DECL ObjectLifeTime
class ObjectLifeTime
{
public:

Expand Down
10 changes: 5 additions & 5 deletions src/framework/Policies/Singleton.h
Expand Up @@ -36,7 +36,7 @@ namespace MaNGOS
class CreatePolicy = MaNGOS::OperatorNew<T>,
class LifeTimePolicy = MaNGOS::ObjectLifeTime<T>
>
class MANGOS_DLL_DECL Singleton
class Singleton
{
public:

Expand Down Expand Up @@ -103,15 +103,15 @@ namespace MaNGOS
}

#define INSTANTIATE_SINGLETON_1(TYPE) \
template class MANGOS_DLL_DECL MaNGOS::Singleton<TYPE, MaNGOS::SingleThreaded<TYPE>, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >;
template class MaNGOS::Singleton<TYPE, MaNGOS::SingleThreaded<TYPE>, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >;

#define INSTANTIATE_SINGLETON_2(TYPE, THREADINGMODEL) \
template class MANGOS_DLL_DECL MaNGOS::Singleton<TYPE, THREADINGMODEL, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >;
template class MaNGOS::Singleton<TYPE, THREADINGMODEL, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >;

#define INSTANTIATE_SINGLETON_3(TYPE, THREADINGMODEL, CREATIONPOLICY ) \
template class MANGOS_DLL_DECL MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, MaNGOS::ObjectLifeTime<TYPE> >;
template class MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, MaNGOS::ObjectLifeTime<TYPE> >;

#define INSTANTIATE_SINGLETON_4(TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME) \
template class MANGOS_DLL_DECL MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >;
template class MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >;

#endif
10 changes: 5 additions & 5 deletions src/framework/Policies/ThreadingModel.h
Expand Up @@ -29,7 +29,7 @@
namespace MaNGOS
{
template<typename MUTEX>
class MANGOS_DLL_DECL GeneralLock
class GeneralLock
{
public:

Expand All @@ -52,7 +52,7 @@ namespace MaNGOS
};

template<class T>
class MANGOS_DLL_DECL SingleThreaded
class SingleThreaded
{
public:

Expand All @@ -72,7 +72,7 @@ namespace MaNGOS
};

template<class T, class MUTEX>
class MANGOS_DLL_DECL ObjectLevelLockable
class ObjectLevelLockable
{
public:

Expand Down Expand Up @@ -107,7 +107,7 @@ namespace MaNGOS
};

template<class T, class MUTEX>
class MANGOS_DLL_DECL ClassLevelLockable
class ClassLevelLockable
{
public:

Expand Down Expand Up @@ -151,6 +151,6 @@ namespace MaNGOS
template<class T, class MUTEX> MUTEX MaNGOS::ClassLevelLockable<T, MUTEX>::si_mtx;

#define INSTANTIATE_CLASS_MUTEX(CTYPE, MUTEX) \
template class MANGOS_DLL_DECL MaNGOS::ClassLevelLockable<CTYPE, MUTEX>
template class MaNGOS::ClassLevelLockable<CTYPE, MUTEX>

#endif
2 changes: 1 addition & 1 deletion src/game/AggressorAI.h
Expand Up @@ -25,7 +25,7 @@

class Creature;

class MANGOS_DLL_DECL AggressorAI : public CreatureAI
class AggressorAI : public CreatureAI
{
enum AggressorState
{
Expand Down
4 changes: 2 additions & 2 deletions src/game/Cell.h
Expand Up @@ -27,7 +27,7 @@
class Map;
class WorldObject;

struct MANGOS_DLL_DECL CellArea
struct CellArea
{
CellArea() {}
CellArea(CellPair low, CellPair high) : low_bound(low), high_bound(high) {}
Expand All @@ -44,7 +44,7 @@ struct MANGOS_DLL_DECL CellArea
CellPair high_bound;
};

struct MANGOS_DLL_DECL Cell
struct Cell
{
Cell() { data.All = 0; }
Cell(const Cell& cell) { data.All = cell.data.All; }
Expand Down
2 changes: 1 addition & 1 deletion src/game/GridDefines.h
Expand Up @@ -75,7 +75,7 @@ typedef TypeMapContainer<AllGridObjectTypes> GridTypeMapContainer;
typedef TypeMapContainer<AllWorldObjectTypes> WorldTypeMapContainer;

template<const unsigned int LIMIT>
struct MANGOS_DLL_DECL CoordPair
struct CoordPair
{
CoordPair(uint32 x = 0, uint32 y = 0) : x_coord(x), y_coord(y) {}
CoordPair(const CoordPair<LIMIT>& obj) : x_coord(obj.x_coord), y_coord(obj.y_coord) {}
Expand Down
2 changes: 1 addition & 1 deletion src/game/GridMap.h
Expand Up @@ -275,7 +275,7 @@ class MANGOS_DLL_SPEC TerrainInfo : public Referencable<AtomicLong>
};

// class for managing TerrainData object and all sort of geometry querying operations
class MANGOS_DLL_DECL TerrainManager : public MaNGOS::Singleton<TerrainManager, MaNGOS::ClassLevelLockable<TerrainManager, ACE_Thread_Mutex> >
class TerrainManager : public MaNGOS::Singleton<TerrainManager, MaNGOS::ClassLevelLockable<TerrainManager, ACE_Thread_Mutex> >
{
typedef UNORDERED_MAP<uint32, TerrainInfo*> TerrainDataMap;
friend class MaNGOS::OperatorNew<TerrainManager>;
Expand Down

2 comments on commit 5267ab5

@xfurry
Copy link
Member

@xfurry xfurry commented on 5267ab5 Feb 27, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Poke @evil-at-wow
I think you haven't removed all of them. We still have it here: https://github.com/cmangos/mangos-wotlk/blob/master/src/game/CreatureAI.h#L94

@evil-at-wow
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No no, that's something else (MANGOS_DLL_SPEC vs MANGOS_DLL_DECL) and it's probably needed to give SD2 access to those symbols.

So we don't want to change that without further checking!

Please sign in to comment.