mirror of
https://github.com/SWG-Source/src.git
synced 2026-07-28 22:15:49 -04:00
Merge branch 'master' into 'master'
make it build with clang (warnings not withstanding) See merge request !6
This commit is contained in:
+1
-1
@@ -48,7 +48,7 @@ elseif(UNIX)
|
||||
find_package(Curses REQUIRED)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -DDEBUG_LEVEL=2 -DPRODUCTION=0 -g -pipe -Wall -Wno-unknown-pragmas -Wno-reorder -O0")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DDEBUG_LEVEL=0 -DPRODUCTION=1 -march=native -pipe -mtune=native -O2 -s")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DDEBUG_LEVEL=0 -DPRODUCTION=1 -march=native -pipe -mtune=native -O2 ")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-write-strings -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0")
|
||||
|
||||
add_definitions(-DLINUX -D_REENTRANT -Dlinux -D_USING_STL -D__STL_NO_BAD_ALLOC -D_GNU_SOURCE -D_XOPEN_SOURCE=500)
|
||||
|
||||
@@ -34,8 +34,8 @@ namespace Archive
|
||||
|
||||
class CityInfo
|
||||
{
|
||||
friend void Archive::get(ReadIterator & source, CityInfo & target);
|
||||
friend void Archive::put(ByteStream & target, const CityInfo & source);
|
||||
friend void Archive::get(Archive::ReadIterator & source, CityInfo & target);
|
||||
friend void Archive::put(Archive::ByteStream & target, const CityInfo & source);
|
||||
|
||||
public:
|
||||
CityInfo();
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace Archive
|
||||
|
||||
class CityStructureInfo
|
||||
{
|
||||
friend void Archive::get(ReadIterator & source, CityStructureInfo & target);
|
||||
friend void Archive::put(ByteStream & target, const CityStructureInfo & source);
|
||||
friend void Archive::get(Archive::ReadIterator & source, CityStructureInfo & target);
|
||||
friend void Archive::put(Archive::ByteStream & target, const CityStructureInfo & source);
|
||||
|
||||
public:
|
||||
bool operator== (const CityStructureInfo& rhs) const;
|
||||
|
||||
@@ -280,10 +280,8 @@ void NpcConversation::sendResponses()
|
||||
*/
|
||||
const NpcConversation::Response & NpcConversation::getResponse(int index) const
|
||||
{
|
||||
const static Response dummy;
|
||||
|
||||
if (m_responses->empty())
|
||||
return dummy;
|
||||
return m_responses->at(static_cast<size_t>(0));
|
||||
|
||||
const int size = static_cast<int>(m_responses->size());
|
||||
if (index < 0)
|
||||
|
||||
@@ -48,8 +48,8 @@ namespace CellPermissions
|
||||
|
||||
class PermissionObject
|
||||
{
|
||||
friend void Archive::get( ReadIterator & source, CellPermissions::PermissionObject & target );
|
||||
friend void Archive::put( ByteStream & target, const CellPermissions::PermissionObject & source );
|
||||
friend void Archive::get( Archive::ReadIterator & source, CellPermissions::PermissionObject & target );
|
||||
friend void Archive::put( Archive::ByteStream & target, const CellPermissions::PermissionObject & source );
|
||||
|
||||
friend class ::BuildingObject;
|
||||
friend class ::CellObject;
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ class AiCreatureStateMessage : public MessageQueue::Data
|
||||
{
|
||||
CONTROLLER_MESSAGE_INTERFACE;
|
||||
|
||||
friend void Archive::get(ReadIterator & source, AiCreatureStateMessage & target);
|
||||
friend void Archive::get(Archive::ReadIterator & source, AiCreatureStateMessage & target);
|
||||
|
||||
public:
|
||||
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ class AiMovementMessage : public MessageQueue::Data
|
||||
{
|
||||
CONTROLLER_MESSAGE_INTERFACE;
|
||||
|
||||
friend void Archive::get(ReadIterator & source, AiMovementMessage & target);
|
||||
friend void Archive::get(Archive::ReadIterator & source, AiMovementMessage & target);
|
||||
|
||||
public:
|
||||
AiMovementMessage();
|
||||
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
const stdvector<ValueDictionary>::fwd & getValueDictionaryArrayParam(int index) const;
|
||||
|
||||
protected:
|
||||
friend void Archive::get(ReadIterator & source, ScriptParams & target);
|
||||
friend void Archive::get(Archive::ReadIterator & source, ScriptParams & target);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -70,8 +70,8 @@ class PopulationList
|
||||
PopulationMapType m_populationMap;
|
||||
mutable PopulationMapType m_populationCache;
|
||||
|
||||
friend void Archive::get(ReadIterator & source, PopulationList & target);
|
||||
friend void Archive::put(ByteStream & target, const PopulationList & source);
|
||||
friend void Archive::get(Archive::ReadIterator & source, PopulationList & target);
|
||||
friend void Archive::put(Archive::ByteStream & target, const PopulationList & source);
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
@@ -41,8 +41,7 @@ public:
|
||||
void add (const T& newElement);
|
||||
void addIfNotExist (const T& newElement);
|
||||
void allocateNext (void);
|
||||
int findOrAdd (const T& newElement);
|
||||
|
||||
|
||||
void insert (int index, const T& newElement);
|
||||
|
||||
// remove an item from the list
|
||||
@@ -244,19 +243,6 @@ inline void ArrayList<T>::addIfNotExist (const T& newElement)
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
template <class T>
|
||||
inline int ArrayList<T>::findOrAdd (const T& newElement)
|
||||
{
|
||||
if (existsInList (newElement, index))
|
||||
return index;
|
||||
|
||||
add (newElement);
|
||||
|
||||
return getNumberOfElements () - 1;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
template <class T>
|
||||
inline void ArrayList<T>::insert (int index, const T& newElement)
|
||||
{
|
||||
|
||||
@@ -63,8 +63,8 @@ public:
|
||||
void getAsDbTextString(std::string &result, int maxNibbleCount = 32767) const;
|
||||
void setFromDbTextString(const char * text);
|
||||
|
||||
friend void Archive::get (ReadIterator &source, BitArray &target);
|
||||
friend void Archive::put (ByteStream &target, const BitArray &source);
|
||||
friend void Archive::get (Archive::ReadIterator &source, BitArray &target);
|
||||
friend void Archive::put (Archive::ByteStream &target, const BitArray &source);
|
||||
|
||||
private:
|
||||
// *****WARNING***** *****WARNING***** *****WARNING***** *****WARNING*****
|
||||
|
||||
@@ -161,8 +161,8 @@ private:
|
||||
mutable bool m_cachedValueDirty;
|
||||
mutable void * m_cachedValue[2];
|
||||
|
||||
friend void Archive::get(ReadIterator & source, DynamicVariable & target);
|
||||
friend void Archive::put(ByteStream & target, const DynamicVariable & source);
|
||||
friend void Archive::get(Archive::ReadIterator & source, DynamicVariable & target);
|
||||
friend void Archive::put(Archive::ByteStream & target, const DynamicVariable & source);
|
||||
};
|
||||
|
||||
//========================================================================
|
||||
|
||||
@@ -28,8 +28,8 @@ namespace Archive
|
||||
|
||||
class WearableEntry
|
||||
{
|
||||
friend void Archive::get(ReadIterator & source, WearableEntry & target);
|
||||
friend void Archive::put(ByteStream & target, const WearableEntry & source);
|
||||
friend void Archive::get(Archive::ReadIterator & source, WearableEntry & target);
|
||||
friend void Archive::put(Archive::ByteStream & target, const WearableEntry & source);
|
||||
|
||||
public:
|
||||
WearableEntry(const std::string&, int, const NetworkId&, int);
|
||||
|
||||
@@ -74,8 +74,8 @@ class PlayerQuestData
|
||||
uint32 m_relativeAgeIndex; // This is not meant to be persisted
|
||||
bool m_hasReceivedReward;
|
||||
|
||||
friend void Archive::get(ReadIterator & source, PlayerQuestData & target);
|
||||
friend void Archive::put(ByteStream & target, const PlayerQuestData & source);
|
||||
friend void Archive::get(Archive::ReadIterator & source, PlayerQuestData & target);
|
||||
friend void Archive::put(Archive::ByteStream & target, const PlayerQuestData & source);
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
@@ -31,8 +31,8 @@ namespace Archive
|
||||
|
||||
class TravelPoint
|
||||
{
|
||||
friend void Archive::get(ReadIterator& source, TravelPoint& target);
|
||||
friend void Archive::put(ByteStream& target, const TravelPoint& source);
|
||||
friend void Archive::get(Archive::ReadIterator& source, TravelPoint& target);
|
||||
friend void Archive::put(Archive::ByteStream& target, const TravelPoint& source);
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user