Skip to content

Commit

Permalink
Revert "Made script library link statically, thereby eliminating DLL …
Browse files Browse the repository at this point in the history
…export related compiler warnings with Visual Studio"

This reverts commit 409f11f.
  • Loading branch information
namreeb committed Oct 30, 2016
1 parent 25de2d6 commit 134ef89
Show file tree
Hide file tree
Showing 66 changed files with 172 additions and 165 deletions.
2 changes: 1 addition & 1 deletion src/framework/GameSystem/GridReference.h
Expand Up @@ -24,7 +24,7 @@
template<class OBJECT> class GridRefManager;

template<class OBJECT>
class GridReference : public Reference<GridRefManager<OBJECT>, OBJECT>
class MANGOS_DLL_SPEC GridReference : public Reference<GridRefManager<OBJECT>, OBJECT>
{
protected:

Expand Down
2 changes: 2 additions & 0 deletions src/framework/Platform/Define.h
Expand Up @@ -80,10 +80,12 @@
#endif // PLATFORM

#if PLATFORM == PLATFORM_WINDOWS
# define MANGOS_DLL_SPEC __declspec(dllexport)
# ifndef DECLSPEC_NORETURN
# define DECLSPEC_NORETURN __declspec(noreturn)
# endif // DECLSPEC_NORETURN
#else // PLATFORM != PLATFORM_WINDOWS
# define MANGOS_DLL_SPEC
# define DECLSPEC_NORETURN
#endif // PLATFORM

Expand Down
2 changes: 1 addition & 1 deletion src/framework/Policies/ObjectLifeTime.cpp
Expand Up @@ -26,7 +26,7 @@ namespace MaNGOS
std::atexit((void (*)())p);
}

void at_exit(void (*func)())
void MANGOS_DLL_SPEC at_exit(void (*func)())
{
external_wrapper((void*)func);
}
Expand Down
2 changes: 1 addition & 1 deletion src/framework/Policies/ObjectLifeTime.h
Expand Up @@ -26,7 +26,7 @@ typedef void (* Destroyer)(void);

namespace MaNGOS
{
void at_exit(void (*func)());
void MANGOS_DLL_SPEC at_exit(void (*func)());

template<class T>
class ObjectLifeTime
Expand Down
4 changes: 2 additions & 2 deletions src/framework/Utilities/LinkedList.h
Expand Up @@ -24,7 +24,7 @@
//============================================
class LinkedListHead;

class LinkedListElement
class MANGOS_DLL_SPEC LinkedListElement
{
private:

Expand Down Expand Up @@ -82,7 +82,7 @@ class LinkedListElement

//============================================

class LinkedListHead
class MANGOS_DLL_SPEC LinkedListHead
{
private:

Expand Down
2 changes: 1 addition & 1 deletion src/framework/Utilities/LinkedReference/Reference.h
Expand Up @@ -24,7 +24,7 @@
//=====================================================

template<class TO, class FROM>
class Reference : public LinkedListElement
class MANGOS_DLL_SPEC Reference : public LinkedListElement
{
private:

Expand Down
2 changes: 1 addition & 1 deletion src/game/AI/CreatureAI.h
Expand Up @@ -93,7 +93,7 @@ enum AIEventType
AI_EVENT_CUSTOM_F = 1005,
};

class CreatureAI
class MANGOS_DLL_SPEC CreatureAI
{
public:
explicit CreatureAI(Creature* creature) :
Expand Down
2 changes: 1 addition & 1 deletion src/game/AI/CreatureEventAI.h
Expand Up @@ -634,7 +634,7 @@ struct CreatureEventAIHolder
bool UpdateRepeatTimer(Creature* creature, uint32 repeatMin, uint32 repeatMax);
};

class CreatureEventAI : public CreatureAI
class MANGOS_DLL_SPEC CreatureEventAI : public CreatureAI
{
public:
explicit CreatureEventAI(Creature* c);
Expand Down
2 changes: 1 addition & 1 deletion src/game/AI/GuardianAI.h
Expand Up @@ -27,7 +27,7 @@
class Creature;
class Spell;

class GuardianAI : public CreatureEventAI
class MANGOS_DLL_SPEC GuardianAI : public CreatureEventAI
{
public:

Expand Down
4 changes: 2 additions & 2 deletions src/game/Camera.h
Expand Up @@ -29,7 +29,7 @@ class WorldPacket;
class Player;

/// Camera - object-receiver. Receives broadcast packets from nearby worldobjects, object visibility changes and sends them to client
class Camera
class MANGOS_DLL_SPEC Camera
{
friend class ViewPoint;
public:
Expand Down Expand Up @@ -77,7 +77,7 @@ class Camera
};

/// Object-observer, notifies farsight object state to cameras that attached to it
class ViewPoint
class MANGOS_DLL_SPEC ViewPoint
{
friend class Camera;

Expand Down
2 changes: 1 addition & 1 deletion src/game/Chat.h
Expand Up @@ -75,7 +75,7 @@ enum PlayerChatTag
};
typedef uint32 ChatTagFlags;

class ChatHandler
class MANGOS_DLL_SPEC ChatHandler
{
public:
explicit ChatHandler(WorldSession* session);
Expand Down
2 changes: 1 addition & 1 deletion src/game/ConfusedMovementGenerator.h
Expand Up @@ -22,7 +22,7 @@
#include "MovementGenerator.h"

template<class T>
class ConfusedMovementGenerator
class MANGOS_DLL_SPEC ConfusedMovementGenerator
: public MovementGeneratorMedium< T, ConfusedMovementGenerator<T> >
{
public:
Expand Down
2 changes: 1 addition & 1 deletion src/game/Creature.h
Expand Up @@ -490,7 +490,7 @@ enum TemporaryFactionFlags // Used at real fact
TEMPFACTION_ALL,
};

class Creature : public Unit
class MANGOS_DLL_SPEC Creature : public Unit
{
CreatureAI* i_AI;
CreatureAI* m_pausedAI; // Main AI will be stored here during the possessing
Expand Down
16 changes: 8 additions & 8 deletions src/game/DBCStores.cpp
Expand Up @@ -982,11 +982,11 @@ uint32 GetCreatureModelRace(uint32 model_id)
}

// script support functions
DBCStorage <SoundEntriesEntry> const* GetSoundEntriesStore() { return &sSoundEntriesStore; }
DBCStorage <SpellEntry> const* GetSpellStore() { return &sSpellStore; }
DBCStorage <SpellRangeEntry> const* GetSpellRangeStore() { return &sSpellRangeStore; }
DBCStorage <FactionEntry> const* GetFactionStore() { return &sFactionStore; }
DBCStorage <ItemEntry> const* GetItemDisplayStore() { return &sItemStore; }
DBCStorage <CreatureDisplayInfoEntry> const* GetCreatureDisplayStore() { return &sCreatureDisplayInfoStore; }
DBCStorage <EmotesEntry> const* GetEmotesStore() { return &sEmotesStore; }
DBCStorage <EmotesTextEntry> const* GetEmotesTextStore() { return &sEmotesTextStore; }
MANGOS_DLL_SPEC DBCStorage <SoundEntriesEntry> const* GetSoundEntriesStore() { return &sSoundEntriesStore; }
MANGOS_DLL_SPEC DBCStorage <SpellEntry> const* GetSpellStore() { return &sSpellStore; }
MANGOS_DLL_SPEC DBCStorage <SpellRangeEntry> const* GetSpellRangeStore() { return &sSpellRangeStore; }
MANGOS_DLL_SPEC DBCStorage <FactionEntry> const* GetFactionStore() { return &sFactionStore; }
MANGOS_DLL_SPEC DBCStorage <ItemEntry> const* GetItemDisplayStore() { return &sItemStore; }
MANGOS_DLL_SPEC DBCStorage <CreatureDisplayInfoEntry> const* GetCreatureDisplayStore() { return &sCreatureDisplayInfoStore; }
MANGOS_DLL_SPEC DBCStorage <EmotesEntry> const* GetEmotesStore() { return &sEmotesStore; }
MANGOS_DLL_SPEC DBCStorage <EmotesTextEntry> const* GetEmotesTextStore() { return &sEmotesTextStore; }
22 changes: 11 additions & 11 deletions src/game/DBCStores.h
Expand Up @@ -41,8 +41,8 @@ uint32 GetAreaFlagByMapId(uint32 mapid);

WMOAreaTableEntry const* GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid, int32 groupid);

AreaTableEntry const* GetAreaEntryByAreaID(uint32 area_id);
AreaTableEntry const* GetAreaEntryByAreaFlagAndMap(uint32 area_flag, uint32 map_id);
MANGOS_DLL_SPEC AreaTableEntry const* GetAreaEntryByAreaID(uint32 area_id);
MANGOS_DLL_SPEC AreaTableEntry const* GetAreaEntryByAreaFlagAndMap(uint32 area_flag, uint32 map_id);

uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId);

Expand Down Expand Up @@ -93,7 +93,7 @@ bool IsPointInAreaTriggerZone(AreaTriggerEntry const* atEntry, uint32 mapid, flo
PvPDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 level);
PvPDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattleGroundBracketId id);

uint32 GetCreatureModelRace(uint32 model_id);
MANGOS_DLL_SPEC uint32 GetCreatureModelRace(uint32 model_id);

extern DBCStorage <AchievementEntry> sAchievementStore;
extern DBCStorage <AchievementCriteriaEntry> sAchievementCriteriaStore;
Expand Down Expand Up @@ -207,13 +207,13 @@ extern DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore;
void LoadDBCStores(const std::string& dataPath);

// script support functions
DBCStorage <SoundEntriesEntry> const* GetSoundEntriesStore();
DBCStorage <SpellEntry> const* GetSpellStore();
DBCStorage <SpellRangeEntry> const* GetSpellRangeStore();
DBCStorage <FactionEntry> const* GetFactionStore();
DBCStorage <ItemEntry> const* GetItemDisplayStore();
DBCStorage <CreatureDisplayInfoEntry> const* GetCreatureDisplayStore();
DBCStorage <EmotesEntry> const* GetEmotesStore();
DBCStorage <EmotesTextEntry> const* GetEmotesTextStore();
MANGOS_DLL_SPEC DBCStorage <SoundEntriesEntry> const* GetSoundEntriesStore();
MANGOS_DLL_SPEC DBCStorage <SpellEntry> const* GetSpellStore();
MANGOS_DLL_SPEC DBCStorage <SpellRangeEntry> const* GetSpellRangeStore();
MANGOS_DLL_SPEC DBCStorage <FactionEntry> const* GetFactionStore();
MANGOS_DLL_SPEC DBCStorage <ItemEntry> const* GetItemDisplayStore();
MANGOS_DLL_SPEC DBCStorage <CreatureDisplayInfoEntry> const* GetCreatureDisplayStore();
MANGOS_DLL_SPEC DBCStorage <EmotesEntry> const* GetEmotesStore();
MANGOS_DLL_SPEC DBCStorage <EmotesTextEntry> const* GetEmotesTextStore();

#endif
4 changes: 2 additions & 2 deletions src/game/FleeingMovementGenerator.h
Expand Up @@ -23,7 +23,7 @@
#include "ObjectGuid.h"

template<class T>
class FleeingMovementGenerator
class MANGOS_DLL_SPEC FleeingMovementGenerator
: public MovementGeneratorMedium< T, FleeingMovementGenerator<T> >
{
public:
Expand All @@ -45,7 +45,7 @@ class FleeingMovementGenerator
TimeTracker i_nextCheckTime;
};

class TimedFleeingMovementGenerator
class MANGOS_DLL_SPEC TimedFleeingMovementGenerator
: public FleeingMovementGenerator<Creature>
{
public:
Expand Down
2 changes: 1 addition & 1 deletion src/game/FollowerReference.h
Expand Up @@ -24,7 +24,7 @@
class TargetedMovementGeneratorBase;
class Unit;

class FollowerReference : public Reference<Unit, TargetedMovementGeneratorBase>
class MANGOS_DLL_SPEC FollowerReference : public Reference<Unit, TargetedMovementGeneratorBase>
{
protected:
void targetObjectBuildLink() override;
Expand Down
2 changes: 1 addition & 1 deletion src/game/GameEventMgr.cpp
Expand Up @@ -1046,7 +1046,7 @@ bool GameEventMgr::IsActiveHoliday(HolidayIds id)
return false;
}

bool IsHolidayActive(HolidayIds id)
MANGOS_DLL_SPEC bool IsHolidayActive(HolidayIds id)
{
return sGameEventMgr.IsActiveHoliday(id);
}
2 changes: 1 addition & 1 deletion src/game/GameEventMgr.h
Expand Up @@ -131,6 +131,6 @@ class GameEventMgr

#define sGameEventMgr MaNGOS::Singleton<GameEventMgr>::Instance()

bool IsHolidayActive(HolidayIds id);
MANGOS_DLL_SPEC bool IsHolidayActive(HolidayIds id);

#endif
2 changes: 1 addition & 1 deletion src/game/GameObject.h
Expand Up @@ -609,7 +609,7 @@ struct GameObjectDisplayInfoEntry;

#define GO_ANIMPROGRESS_DEFAULT 0xFF

class GameObject : public WorldObject
class MANGOS_DLL_SPEC GameObject : public WorldObject
{
public:
explicit GameObject();
Expand Down
4 changes: 2 additions & 2 deletions src/game/GossipDef.h
Expand Up @@ -155,7 +155,7 @@ struct QuestMenuItem

typedef std::vector<QuestMenuItem> QuestMenuItemList;

class GossipMenu
class MANGOS_DLL_SPEC GossipMenu
{
public:
explicit GossipMenu(WorldSession* session);
Expand Down Expand Up @@ -243,7 +243,7 @@ class QuestMenu
QuestMenuItemList m_qItems;
};

class PlayerMenu
class MANGOS_DLL_SPEC PlayerMenu
{
private:
GossipMenu mGossipMenu;
Expand Down
4 changes: 2 additions & 2 deletions src/game/GridMap.h
Expand Up @@ -184,7 +184,7 @@ class GridMap
};

template<typename Countable>
class Referencable
class MANGOS_DLL_SPEC Referencable
{
public:
Referencable() { m_count = 0; }
Expand All @@ -208,7 +208,7 @@ class Referencable
#define DEFAULT_WATER_SEARCH 50.0f // default search distance to case detection water level

// class for sharing and managin GridMap objects
class TerrainInfo : public Referencable<std::atomic_long>
class MANGOS_DLL_SPEC TerrainInfo : public Referencable<std::atomic_long>
{
public:
TerrainInfo(uint32 mapid);
Expand Down
2 changes: 1 addition & 1 deletion src/game/Group.h
Expand Up @@ -114,7 +114,7 @@ struct InstanceGroupBind

/** request member stats checken **/
/** todo: uninvite people that not accepted invite **/
class Group
class MANGOS_DLL_SPEC Group
{
public:
struct MemberSlot
Expand Down
2 changes: 1 addition & 1 deletion src/game/GroupReference.h
Expand Up @@ -24,7 +24,7 @@
class Group;
class Player;

class GroupReference : public Reference<Group, Player>
class MANGOS_DLL_SPEC GroupReference : public Reference<Group, Player>
{
protected:
uint8 iSubGroup;
Expand Down
4 changes: 2 additions & 2 deletions src/game/HomeMovementGenerator.h
Expand Up @@ -24,10 +24,10 @@
class Creature;

template < class T >
class HomeMovementGenerator;
class MANGOS_DLL_SPEC HomeMovementGenerator;

template <>
class HomeMovementGenerator<Creature>
class MANGOS_DLL_SPEC HomeMovementGenerator<Creature>
: public MovementGeneratorMedium< Creature, HomeMovementGenerator<Creature> >
{
public:
Expand Down
6 changes: 3 additions & 3 deletions src/game/IdleMovementGenerator.h
Expand Up @@ -21,7 +21,7 @@

#include "MovementGenerator.h"

class IdleMovementGenerator : public MovementGenerator
class MANGOS_DLL_SPEC IdleMovementGenerator : public MovementGenerator
{
public:

Expand All @@ -35,7 +35,7 @@ class IdleMovementGenerator : public MovementGenerator

extern IdleMovementGenerator si_idleMovement;

class DistractMovementGenerator : public MovementGenerator
class MANGOS_DLL_SPEC DistractMovementGenerator : public MovementGenerator
{
public:
explicit DistractMovementGenerator(uint32 timer) : m_timer(timer) {}
Expand All @@ -51,7 +51,7 @@ class DistractMovementGenerator : public MovementGenerator
uint32 m_timer;
};

class AssistanceDistractMovementGenerator : public DistractMovementGenerator
class MANGOS_DLL_SPEC AssistanceDistractMovementGenerator : public DistractMovementGenerator
{
public:
AssistanceDistractMovementGenerator(uint32 timer) :
Expand Down
2 changes: 1 addition & 1 deletion src/game/InstanceData.h
Expand Up @@ -61,7 +61,7 @@ enum EncounterFrameTypes // only raid UI spec
ENCOUNTER_FRAME_UNK7 = 7 // sorting encounter units
};

class InstanceData
class MANGOS_DLL_SPEC InstanceData
{
public:

Expand Down
2 changes: 1 addition & 1 deletion src/game/Item.h
Expand Up @@ -269,7 +269,7 @@ struct ItemRequiredTarget

bool ItemCanGoIntoBag(ItemPrototype const* proto, ItemPrototype const* pBagProto);

class Item : public Object
class MANGOS_DLL_SPEC Item : public Object
{
public:
static Item* CreateItem(uint32 item, uint32 count, Player const* player = nullptr, uint32 randomPropertyId = 0);
Expand Down

0 comments on commit 134ef89

Please sign in to comment.