summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/Packets/ByteBuffer.h19
-rw-r--r--src/common/Packets/WorldPacket.h7
-rw-r--r--src/common/Utilities/Util.h5
-rw-r--r--src/server/game/Entities/Object/Object.h14
-rw-r--r--src/server/game/Entities/Unit/Unit.h8
-rw-r--r--src/server/game/Movement/Spline/MoveSplineFlag.h6
6 files changed, 49 insertions, 10 deletions
diff --git a/src/common/Packets/ByteBuffer.h b/src/common/Packets/ByteBuffer.h
index 86c7d207db..2659afcdc4 100644
--- a/src/common/Packets/ByteBuffer.h
+++ b/src/common/Packets/ByteBuffer.h
@@ -72,6 +72,12 @@ class ByteBuffer
_storage(buf._storage)
{
}
+ /* requried as of C++ 11 */
+ #if __cplusplus >= 201103L
+ ByteBuffer(ByteBuffer&&) = default;
+ ByteBuffer& operator=(const ByteBuffer&) = default;
+ ByteBuffer& operator=(ByteBuffer&&) = default;
+ #endif
void clear()
{
@@ -374,18 +380,18 @@ class ByteBuffer
return *this;
}
- uint8 * contents()
- {
+ uint8 * contents()
+ {
if (_storage.empty())
throw ByteBufferException();
- return &_storage[0];
+ return &_storage[0];
}
- const uint8 *contents() const
- {
+ const uint8 *contents() const
+ {
if (_storage.empty())
throw ByteBufferException();
- return &_storage[0];
+ return &_storage[0];
}
size_t size() const { return _storage.size(); }
@@ -612,4 +618,3 @@ inline void ByteBuffer::read_skip<std::string>()
}
#endif
-
diff --git a/src/common/Packets/WorldPacket.h b/src/common/Packets/WorldPacket.h
index 2c926dfa61..16887ad6e9 100644
--- a/src/common/Packets/WorldPacket.h
+++ b/src/common/Packets/WorldPacket.h
@@ -22,6 +22,12 @@ class WorldPacket : public ByteBuffer
WorldPacket(const WorldPacket &packet) : ByteBuffer(packet), m_opcode(packet.m_opcode)
{
}
+ /* requried as of C++ 11 */
+ #if __cplusplus >= 201103L
+ WorldPacket(WorldPacket&&) = default;
+ WorldPacket& operator=(const WorldPacket&) = default;
+ WorldPacket& operator=(WorldPacket&&) = default;
+ #endif
void Initialize(uint16 opcode, size_t newres=200)
{
@@ -37,4 +43,3 @@ class WorldPacket : public ByteBuffer
uint16 m_opcode;
};
#endif
-
diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h
index ce8a016559..d14a339ac3 100644
--- a/src/common/Utilities/Util.h
+++ b/src/common/Utilities/Util.h
@@ -449,6 +449,11 @@ public:
part[2] = right.part[2];
return *this;
}
+ /* requried as of C++ 11 */
+ #if __cplusplus >= 201103L
+ flag96(const flag96&) = default;
+ flag96(flag96&&) = default;
+ #endif
inline flag96 operator&(flag96 const& right) const
{
diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h
index e5167c03c3..43aeb87249 100644
--- a/src/server/game/Entities/Object/Object.h
+++ b/src/server/game/Entities/Object/Object.h
@@ -376,6 +376,12 @@ struct Position
: m_positionX(x), m_positionY(y), m_positionZ(z), m_orientation(NormalizeOrientation(o)) { }
Position(Position const& loc) { Relocate(loc); }
+ /* requried as of C++ 11 */
+ #if __cplusplus >= 201103L
+ Position(Position&&) = default;
+ Position& operator=(const Position&) = default;
+ Position& operator=(Position&&) = default;
+ #endif
struct PositionXYStreamer
{
@@ -639,7 +645,13 @@ class WorldLocation : public Position
public:
explicit WorldLocation(uint32 _mapid = MAPID_INVALID, float _x = 0, float _y = 0, float _z = 0, float _o = 0)
: m_mapId(_mapid) { Relocate(_x, _y, _z, _o); }
- WorldLocation(const WorldLocation &loc) { WorldRelocate(loc); }
+ WorldLocation(const WorldLocation &loc) : Position () { WorldRelocate(loc); }
+ /* requried as of C++ 11 */
+ #if __cplusplus >= 201103L
+ WorldLocation(WorldLocation&&) = default;
+ WorldLocation& operator=(const WorldLocation&) = default;
+ WorldLocation& operator=(WorldLocation&&) = default;
+ #endif
void WorldRelocate(const WorldLocation &loc)
{
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index dfae9c1e73..8e54765e47 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -657,7 +657,7 @@ enum NPCFlags
UNIT_NPC_FLAG_GUILD_BANKER = 0x00800000, // cause client to send 997 opcode
UNIT_NPC_FLAG_SPELLCLICK = 0x01000000, // cause client to send 1015 opcode (spell click)
UNIT_NPC_FLAG_PLAYER_VEHICLE = 0x02000000, // players with mounts that have vehicle data should have it set
- UNIT_NPC_FLAG_MAILBOX = 0x04000000 //
+ UNIT_NPC_FLAG_MAILBOX = 0x04000000 //
};
enum MovementFlags
@@ -1314,6 +1314,12 @@ public:
_posOwner.Relocate(c._posOwner);
_posTarget.Relocate(c._posTarget);
}
+ /* requried as of C++ 11 */
+ #if __cplusplus >= 201103L
+ MMapTargetData(MMapTargetData&&) = default;
+ MMapTargetData& operator=(const MMapTargetData&) = default;
+ MMapTargetData& operator=(MMapTargetData&&) = default;
+ #endif
bool PosChanged(const Position& o, const Position& t) const
{
return _posOwner.GetExactDistSq(&o) > 0.5f*0.5f || _posTarget.GetExactDistSq(&t) > 0.5f*0.5f;
diff --git a/src/server/game/Movement/Spline/MoveSplineFlag.h b/src/server/game/Movement/Spline/MoveSplineFlag.h
index 6c3ae28017..6740da9680 100644
--- a/src/server/game/Movement/Spline/MoveSplineFlag.h
+++ b/src/server/game/Movement/Spline/MoveSplineFlag.h
@@ -68,6 +68,12 @@ namespace Movement
MoveSplineFlag() { raw() = 0; }
MoveSplineFlag(uint32 f) { raw() = f; }
MoveSplineFlag(const MoveSplineFlag& f) { raw() = f.raw(); }
+ /* requried as of C++ 11 */
+ #if __cplusplus >= 201103L
+ MoveSplineFlag(MoveSplineFlag&&) = default;
+ MoveSplineFlag& operator=(const MoveSplineFlag&) = default;
+ MoveSplineFlag& operator=(MoveSplineFlag&&) = default;
+ #endif
// Constant interface