Noexcept all the things!
This commit is contained in:
parent
456f2b32e7
commit
15f84dc712
|
|
@ -111,6 +111,7 @@ Nazara Engine:
|
|||
- InstancedRenderable::SetMaterial methods are now public.
|
||||
- Fixed Model copy constructor not copying materials
|
||||
- ⚠️ Added InstancedRenderable::Clone() method
|
||||
- Fixed a lot of classes not having their move constructor/assignation operator marked noexcept
|
||||
|
||||
Nazara Development Kit:
|
||||
- Added ImageWidget (#139)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace Ndk
|
|||
using Factory = std::function<BaseComponent*()>;
|
||||
|
||||
BaseComponent(ComponentIndex componentIndex);
|
||||
BaseComponent(BaseComponent&&) = default;
|
||||
BaseComponent(BaseComponent&&) noexcept = default;
|
||||
virtual ~BaseComponent();
|
||||
|
||||
virtual std::unique_ptr<BaseComponent> Clone() const = 0;
|
||||
|
|
@ -34,7 +34,7 @@ namespace Ndk
|
|||
inline static ComponentIndex GetMaxComponentIndex();
|
||||
|
||||
BaseComponent& operator=(const BaseComponent&) = delete;
|
||||
BaseComponent& operator=(BaseComponent&&) = default;
|
||||
BaseComponent& operator=(BaseComponent&&) noexcept = default;
|
||||
|
||||
protected:
|
||||
BaseComponent(const BaseComponent&) = default;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace Ndk
|
|||
|
||||
BaseWidget(BaseWidget* parent);
|
||||
BaseWidget(const BaseWidget&) = delete;
|
||||
BaseWidget(BaseWidget&&) = default;
|
||||
BaseWidget(BaseWidget&&) = delete;
|
||||
virtual ~BaseWidget();
|
||||
|
||||
template<typename T, typename... Args> T* Add(Args&&... args);
|
||||
|
|
@ -72,7 +72,7 @@ namespace Ndk
|
|||
void Show(bool show = true);
|
||||
|
||||
BaseWidget& operator=(const BaseWidget&) = delete;
|
||||
BaseWidget& operator=(BaseWidget&&) = default;
|
||||
BaseWidget& operator=(BaseWidget&&) = delete;
|
||||
|
||||
struct Padding
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@ namespace Ndk
|
|||
public:
|
||||
System();
|
||||
System(const System&) = delete;
|
||||
System(System&&) = default;
|
||||
System(System&&) noexcept = default;
|
||||
virtual ~System();
|
||||
|
||||
System& operator=(const System&) = delete;
|
||||
System& operator=(System&&) = default;
|
||||
System& operator=(System&&) noexcept = default;
|
||||
|
||||
static SystemIndex RegisterSystem();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2017 Samy Bensaid
|
||||
// Copyright (C) 2017 Samy Bensaid
|
||||
// This file is part of the "Nazara Development Kit"
|
||||
// For conditions of distribution and use, see copyright notice in Prerequisites.hpp
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace Nz
|
|||
public:
|
||||
AbstractHash() = default;
|
||||
AbstractHash(const AbstractHash&) = delete;
|
||||
AbstractHash(AbstractHash&&) = default;
|
||||
AbstractHash(AbstractHash&&) noexcept = default;
|
||||
virtual ~AbstractHash();
|
||||
|
||||
virtual void Append(const UInt8* data, std::size_t len) = 0;
|
||||
|
|
@ -31,7 +31,7 @@ namespace Nz
|
|||
virtual const char* GetHashName() const = 0;
|
||||
|
||||
AbstractHash& operator=(const AbstractHash&) = delete;
|
||||
AbstractHash& operator=(AbstractHash&&) = default;
|
||||
AbstractHash& operator=(AbstractHash&&) noexcept = default;
|
||||
|
||||
static std::unique_ptr<AbstractHash> Get(HashType hash);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace Nz
|
|||
inline ByteArray(size_type n, value_type value);
|
||||
template <class InputIterator> ByteArray(InputIterator first, InputIterator last);
|
||||
ByteArray(const ByteArray& other) = default;
|
||||
ByteArray(ByteArray&& other) = default;
|
||||
ByteArray(ByteArray&& other) noexcept = default;
|
||||
~ByteArray() = default;
|
||||
|
||||
inline iterator Append(const void* buffer, size_type size);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace Nz
|
|||
ByteStream(void* ptr, Nz::UInt64 size);
|
||||
ByteStream(const void* ptr, Nz::UInt64 size);
|
||||
ByteStream(const ByteStream&) = delete;
|
||||
inline ByteStream(ByteStream&& stream);
|
||||
ByteStream(ByteStream&& stream) noexcept = default;
|
||||
virtual ~ByteStream();
|
||||
|
||||
inline Endianness GetDataEndianness() const;
|
||||
|
|
@ -50,7 +50,7 @@ namespace Nz
|
|||
ByteStream& operator<<(const T& value);
|
||||
|
||||
ByteStream& operator=(const ByteStream&) = delete;
|
||||
inline ByteStream& operator=(ByteStream&&);
|
||||
ByteStream& operator=(ByteStream&&) noexcept = default;
|
||||
|
||||
private:
|
||||
virtual void OnEmptyStream();
|
||||
|
|
|
|||
|
|
@ -16,19 +16,6 @@ namespace Nz
|
|||
m_context.stream = stream;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a ByteStream object by move semantic
|
||||
*
|
||||
* \param stream ByteStream to move into this
|
||||
*/
|
||||
|
||||
inline ByteStream::ByteStream(ByteStream&& stream) :
|
||||
m_ownedStream(std::move(stream.m_ownedStream)),
|
||||
m_context(stream.m_context)
|
||||
{
|
||||
stream.m_context.stream = nullptr;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Destructs the object and calls FlushBits
|
||||
*
|
||||
|
|
@ -204,23 +191,6 @@ namespace Nz
|
|||
|
||||
return *this;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Moves the other byte stream into this
|
||||
* \return A reference to this
|
||||
*
|
||||
* \param stream ByteStream to move in this
|
||||
*/
|
||||
|
||||
inline ByteStream& ByteStream::operator=(ByteStream&& stream)
|
||||
{
|
||||
m_context = stream.m_context;
|
||||
m_ownedStream = std::move(stream.m_ownedStream);
|
||||
|
||||
stream.m_context.stream = nullptr;
|
||||
|
||||
return *this;
|
||||
}
|
||||
}
|
||||
|
||||
#include <Nazara/Core/DebugOff.hpp>
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@ namespace Nz
|
|||
public:
|
||||
CallOnExit(Func func = nullptr);
|
||||
CallOnExit(const CallOnExit&) = delete;
|
||||
CallOnExit(CallOnExit&&) = delete;
|
||||
CallOnExit(CallOnExit&&) noexcept = delete;
|
||||
~CallOnExit();
|
||||
|
||||
void CallAndReset(Func func = nullptr);
|
||||
void Reset(Func func = nullptr);
|
||||
|
||||
CallOnExit& operator=(const CallOnExit&) = delete;
|
||||
CallOnExit& operator=(CallOnExit&&) = default;
|
||||
CallOnExit& operator=(CallOnExit&&) noexcept = default;
|
||||
|
||||
private:
|
||||
Func m_func;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Nz
|
|||
public:
|
||||
FileLogger(const String& logPath = "NazaraLog.log");
|
||||
FileLogger(const FileLogger&) = default;
|
||||
FileLogger(FileLogger&&) = default;
|
||||
FileLogger(FileLogger&&) noexcept = default;
|
||||
~FileLogger();
|
||||
|
||||
void EnableTimeLogging(bool enable);
|
||||
|
|
@ -32,7 +32,7 @@ namespace Nz
|
|||
void WriteError(ErrorType type, const String& error, unsigned int line = 0, const char* file = nullptr, const char* function = nullptr) override;
|
||||
|
||||
FileLogger& operator=(const FileLogger&) = default;
|
||||
FileLogger& operator=(FileLogger&&) = default;
|
||||
FileLogger& operator=(FileLogger&&) noexcept = default;
|
||||
|
||||
private:
|
||||
File m_outputFile;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace Nz
|
|||
GuillotineBinPack(unsigned int width, unsigned int height);
|
||||
GuillotineBinPack(const Vector2ui& size);
|
||||
GuillotineBinPack(const GuillotineBinPack&) = default;
|
||||
GuillotineBinPack(GuillotineBinPack&&) = default;
|
||||
GuillotineBinPack(GuillotineBinPack&&) noexcept = default;
|
||||
~GuillotineBinPack() = default;
|
||||
|
||||
void Clear();
|
||||
|
|
@ -52,7 +52,7 @@ namespace Nz
|
|||
void Reset(const Vector2ui& size);
|
||||
|
||||
GuillotineBinPack& operator=(const GuillotineBinPack&) = default;
|
||||
GuillotineBinPack& operator=(GuillotineBinPack&&) = default;
|
||||
GuillotineBinPack& operator=(GuillotineBinPack&&) noexcept = default;
|
||||
|
||||
enum FreeRectChoiceHeuristic : int
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#define NAZARA_MEMORYSTREAM_HPP
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Core/MovablePtr.hpp>
|
||||
#include <Nazara/Core/Stream.hpp>
|
||||
|
||||
namespace Nz
|
||||
|
|
@ -20,7 +21,7 @@ namespace Nz
|
|||
inline MemoryStream();
|
||||
inline MemoryStream(ByteArray* byteArray, OpenModeFlags openMode = OpenMode_ReadWrite);
|
||||
MemoryStream(const MemoryStream&) = default;
|
||||
MemoryStream(MemoryStream&&) = default;
|
||||
MemoryStream(MemoryStream&&) noexcept = default;
|
||||
~MemoryStream() = default;
|
||||
|
||||
void Clear();
|
||||
|
|
@ -36,14 +37,14 @@ namespace Nz
|
|||
bool SetCursorPos(UInt64 offset) override;
|
||||
|
||||
MemoryStream& operator=(const MemoryStream&) = default;
|
||||
MemoryStream& operator=(MemoryStream&&) = default;
|
||||
MemoryStream& operator=(MemoryStream&&) noexcept = default;
|
||||
|
||||
private:
|
||||
void FlushStream() override;
|
||||
std::size_t ReadBlock(void* buffer, std::size_t size) override;
|
||||
std::size_t WriteBlock(const void* buffer, std::size_t size) override;
|
||||
|
||||
ByteArray* m_buffer;
|
||||
MovablePtr<ByteArray> m_buffer;
|
||||
UInt64 m_pos;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Core/Color.hpp>
|
||||
#include <Nazara/Core/MovablePtr.hpp>
|
||||
#include <Nazara/Core/String.hpp>
|
||||
#include <atomic>
|
||||
#include <unordered_map>
|
||||
|
|
@ -72,7 +73,7 @@ namespace Nz
|
|||
|
||||
std::atomic_uint counter;
|
||||
Destructor destructor;
|
||||
void* ptr;
|
||||
MovablePtr<void> ptr;
|
||||
};
|
||||
|
||||
ParameterType type;
|
||||
|
|
@ -81,6 +82,7 @@ namespace Nz
|
|||
// We define an empty constructor/destructor, to be able to put classes in the union
|
||||
Value() {}
|
||||
Value(const Value&) {} // Placeholder
|
||||
Value(Value&&) noexcept {} // Placeholder
|
||||
~Value() {}
|
||||
|
||||
bool boolVal;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Nz
|
|||
public:
|
||||
PrimitiveList() = default;
|
||||
PrimitiveList(const PrimitiveList&) = default;
|
||||
PrimitiveList(PrimitiveList&&) = default;
|
||||
PrimitiveList(PrimitiveList&&) noexcept = default;
|
||||
~PrimitiveList() = default;
|
||||
|
||||
void AddBox(const Vector3f& lengths, const Vector3ui& subdivision = Vector3ui(0U), const Matrix4f& transformMatrix = Matrix4f::Identity());
|
||||
|
|
@ -41,7 +41,7 @@ namespace Nz
|
|||
std::size_t GetSize() const;
|
||||
|
||||
PrimitiveList& operator=(const PrimitiveList&) = default;
|
||||
PrimitiveList& operator=(PrimitiveList&&) = default;
|
||||
PrimitiveList& operator=(PrimitiveList&&) noexcept = default;
|
||||
|
||||
Primitive& operator()(unsigned int i);
|
||||
const Primitive& operator()(unsigned int i) const;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace Nz
|
|||
public:
|
||||
RefCounted(bool persistent = true);
|
||||
RefCounted(const RefCounted&) = delete;
|
||||
RefCounted(RefCounted&&) = default;
|
||||
RefCounted(RefCounted&&) = delete;
|
||||
virtual ~RefCounted();
|
||||
|
||||
void AddReference() const;
|
||||
|
|
@ -37,7 +37,7 @@ namespace Nz
|
|||
bool SetPersistent(bool persistent = true, bool checkReferenceCount = false);
|
||||
|
||||
RefCounted& operator=(const RefCounted&) = delete;
|
||||
RefCounted& operator=(RefCounted&&) = default;
|
||||
RefCounted& operator=(RefCounted&&) = delete;
|
||||
|
||||
private:
|
||||
std::atomic_bool m_persistent;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Core/Config.hpp>
|
||||
#include <Nazara/Core/Endianness.hpp>
|
||||
#include <Nazara/Core/MovablePtr.hpp>
|
||||
#include <Nazara/Core/TypeTag.hpp>
|
||||
|
||||
namespace Nz
|
||||
|
|
@ -18,7 +19,7 @@ namespace Nz
|
|||
|
||||
struct NAZARA_CORE_API SerializationContext
|
||||
{
|
||||
Stream* stream;
|
||||
MovablePtr<Stream> stream;
|
||||
Endianness endianness = Endianness_BigEndian; //< Default to Big Endian encoding
|
||||
UInt8 readBitPos = 8; //< 8 means no bit is currently read
|
||||
UInt8 readByte; //< Undefined value, will be initialized at the first bit read
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Nz
|
|||
public:
|
||||
StdLogger() = default;
|
||||
StdLogger(const StdLogger&) = default;
|
||||
StdLogger(StdLogger&&) = default;
|
||||
StdLogger(StdLogger&&) noexcept = default;
|
||||
~StdLogger();
|
||||
|
||||
void EnableStdReplication(bool enable) override;
|
||||
|
|
@ -28,7 +28,7 @@ namespace Nz
|
|||
void WriteError(ErrorType type, const String& error, unsigned int line = 0, const char* file = nullptr, const char* function = nullptr) override;
|
||||
|
||||
StdLogger& operator=(const StdLogger&) = default;
|
||||
StdLogger& operator=(StdLogger&&) = default;
|
||||
StdLogger& operator=(StdLogger&&) noexcept = default;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace Nz
|
|||
{
|
||||
public:
|
||||
Stream(const Stream&) = default;
|
||||
Stream(Stream&&) = default;
|
||||
Stream(Stream&&) noexcept = default;
|
||||
virtual ~Stream();
|
||||
|
||||
virtual bool EndOfStream() const = 0;
|
||||
|
|
@ -52,7 +52,7 @@ namespace Nz
|
|||
inline std::size_t Write(const void* buffer, std::size_t size);
|
||||
|
||||
Stream& operator=(const Stream&) = default;
|
||||
Stream& operator=(Stream&&) = default;
|
||||
Stream& operator=(Stream&&) noexcept = default;
|
||||
|
||||
protected:
|
||||
inline Stream(StreamOptionFlags streamOptions = StreamOption_None, OpenModeFlags openMode = OpenMode_NotOpen);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace Nz
|
|||
|
||||
AbstractRenderQueue() = default;
|
||||
AbstractRenderQueue(const AbstractRenderQueue&) = delete;
|
||||
AbstractRenderQueue(AbstractRenderQueue&&) = default;
|
||||
AbstractRenderQueue(AbstractRenderQueue&&) noexcept = default;
|
||||
virtual ~AbstractRenderQueue();
|
||||
|
||||
// Je ne suis vraiment pas fan du nombre de surcharges pour AddBillboards,
|
||||
|
|
@ -55,7 +55,7 @@ namespace Nz
|
|||
virtual void Clear(bool fully = false);
|
||||
|
||||
AbstractRenderQueue& operator=(const AbstractRenderQueue&) = delete;
|
||||
AbstractRenderQueue& operator=(AbstractRenderQueue&&) = default;
|
||||
AbstractRenderQueue& operator=(AbstractRenderQueue&&) noexcept = default;
|
||||
|
||||
struct DirectionalLight
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace Nz
|
|||
public:
|
||||
AbstractRenderTechnique();
|
||||
AbstractRenderTechnique(const AbstractRenderTechnique&) = delete;
|
||||
AbstractRenderTechnique(AbstractRenderTechnique&&) = default;
|
||||
AbstractRenderTechnique(AbstractRenderTechnique&&) noexcept = default;
|
||||
virtual ~AbstractRenderTechnique();
|
||||
|
||||
virtual void Clear(const SceneData& sceneData) const = 0;
|
||||
|
|
@ -37,7 +37,7 @@ namespace Nz
|
|||
virtual bool IsInstancingEnabled() const;
|
||||
|
||||
AbstractRenderTechnique& operator=(const AbstractRenderTechnique&) = delete;
|
||||
AbstractRenderTechnique& operator=(AbstractRenderTechnique&&) = default;
|
||||
AbstractRenderTechnique& operator=(AbstractRenderTechnique&&) noexcept = default;
|
||||
|
||||
protected:
|
||||
bool m_instancingEnabled;
|
||||
|
|
|
|||
|
|
@ -19,8 +19,13 @@ namespace Nz
|
|||
using Index = Nz::UInt64;
|
||||
|
||||
RenderQueueInternal() = default;
|
||||
RenderQueueInternal(const RenderQueueInternal&) = default;
|
||||
RenderQueueInternal(RenderQueueInternal&&) = default;
|
||||
~RenderQueueInternal() = default;
|
||||
|
||||
RenderQueueInternal& operator=(const RenderQueueInternal&) = default;
|
||||
RenderQueueInternal& operator=(RenderQueueInternal&&) = default;
|
||||
|
||||
protected:
|
||||
using RenderDataPair = std::pair<Index, std::size_t>;
|
||||
|
||||
|
|
@ -39,7 +44,7 @@ namespace Nz
|
|||
|
||||
RenderQueue() = default;
|
||||
RenderQueue(const RenderQueue&) = default;
|
||||
RenderQueue(RenderQueue&&) = default;
|
||||
RenderQueue(RenderQueue&&) noexcept = default;
|
||||
~RenderQueue() = default;
|
||||
|
||||
void Clear();
|
||||
|
|
@ -55,7 +60,7 @@ namespace Nz
|
|||
inline size_type size() const;
|
||||
|
||||
RenderQueue& operator=(const RenderQueue&) = default;
|
||||
RenderQueue& operator=(RenderQueue&&) = default;
|
||||
RenderQueue& operator=(RenderQueue&&) noexcept = default;
|
||||
|
||||
private:
|
||||
const RenderData& GetData(std::size_t i) const;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace Nz
|
|||
public:
|
||||
Renderable() = default;
|
||||
Renderable(const Renderable& renderable) = default;
|
||||
Renderable(Renderable&&) = default;
|
||||
Renderable(Renderable&&) noexcept = default;
|
||||
virtual ~Renderable();
|
||||
|
||||
virtual void AddToRenderQueue(AbstractRenderQueue* renderQueue, const Matrix4f& transformMatrix) const = 0;
|
||||
|
|
@ -33,7 +33,7 @@ namespace Nz
|
|||
virtual void UpdateBoundingVolume(const Matrix4f& transformMatrix);
|
||||
|
||||
Renderable& operator=(const Renderable& renderable) = default;
|
||||
Renderable& operator=(Renderable&& renderable) = default;
|
||||
Renderable& operator=(Renderable&& renderable) noexcept = default;
|
||||
|
||||
protected:
|
||||
virtual void MakeBoundingVolume() const = 0;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Nz
|
|||
{
|
||||
public:
|
||||
AbstractSocket(const AbstractSocket&) = delete;
|
||||
AbstractSocket(AbstractSocket&& abstractSocket);
|
||||
AbstractSocket(AbstractSocket&& abstractSocket) noexcept;
|
||||
virtual ~AbstractSocket();
|
||||
|
||||
void Close();
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ namespace Nz
|
|||
std::vector<ENetPeer> m_peers;
|
||||
std::vector<PendingIncomingPacket> m_pendingIncomingPackets;
|
||||
std::vector<PendingOutgoingPacket> m_pendingOutgoingPackets;
|
||||
UInt8* m_receivedData;
|
||||
MovablePtr<UInt8> m_receivedData;
|
||||
Bitset<UInt64> m_dispatchQueue;
|
||||
MemoryPool m_packetPool;
|
||||
IpAddress m_address;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
Copyright(c) 2002 - 2016 Lee Salzman
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :
|
||||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Core/Bitset.hpp>
|
||||
#include <Nazara/Core/MovablePtr.hpp>
|
||||
#include <Nazara/Network/ENetPacket.hpp>
|
||||
#include <Nazara/Network/ENetProtocol.hpp>
|
||||
#include <Nazara/Network/IpAddress.hpp>
|
||||
|
|
@ -176,8 +177,8 @@ namespace Nz
|
|||
|
||||
static constexpr std::size_t unsequencedWindow = ENetPeer_ReliableWindowSize / 32;
|
||||
|
||||
ENetHost* m_host;
|
||||
IpAddress m_address; /**< Internet address of the peer */
|
||||
MovablePtr<ENetHost> m_host;
|
||||
IpAddress m_address; //< Internet address of the peer
|
||||
std::array<UInt32, unsequencedWindow> m_unsequencedWindow;
|
||||
std::bernoulli_distribution m_packetLossProbability;
|
||||
std::list<IncomingCommmand> m_dispatchedCommands;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace Nz
|
|||
inline explicit IpAddress(const char* address);
|
||||
inline explicit IpAddress(const String& address);
|
||||
IpAddress(const IpAddress&) = default;
|
||||
IpAddress(IpAddress&&) = default;
|
||||
IpAddress(IpAddress&&) noexcept = default;
|
||||
~IpAddress() = default;
|
||||
|
||||
bool BuildFromAddress(const char* address);
|
||||
|
|
@ -53,7 +53,7 @@ namespace Nz
|
|||
inline explicit operator bool() const;
|
||||
|
||||
IpAddress& operator=(const IpAddress&) = default;
|
||||
IpAddress& operator=(IpAddress&&) = default;
|
||||
IpAddress& operator=(IpAddress&&) noexcept = default;
|
||||
|
||||
static String ResolveAddress(const IpAddress& address, String* service = nullptr, ResolveError* error = nullptr);
|
||||
static std::vector<HostnameInfo> ResolveHostname(NetProtocol procol, const String& hostname, const String& protocol = "http", ResolveError* error = nullptr);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2017 Jérôme Leclercq
|
||||
// Copyright (C) 2017 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Network module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace Nz
|
|||
|
||||
public:
|
||||
inline TcpClient();
|
||||
TcpClient(TcpClient&& tcpClient) = default;
|
||||
TcpClient(TcpClient&& tcpClient) noexcept = default;
|
||||
~TcpClient() = default;
|
||||
|
||||
SocketState Connect(const IpAddress& remoteAddress);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace Nz
|
|||
public:
|
||||
inline UdpSocket();
|
||||
inline UdpSocket(NetProtocol protocol);
|
||||
inline UdpSocket(UdpSocket&& udpSocket);
|
||||
inline UdpSocket(UdpSocket&& udpSocket) noexcept;
|
||||
~UdpSocket() = default;
|
||||
|
||||
inline SocketState Bind(UInt16 port);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace Nz
|
|||
* \param udpSocket UdpSocket to move into this
|
||||
*/
|
||||
|
||||
inline UdpSocket::UdpSocket(UdpSocket&& udpSocket) :
|
||||
inline UdpSocket::UdpSocket(UdpSocket&& udpSocket) noexcept :
|
||||
AbstractSocket(std::move(udpSocket)),
|
||||
m_boundAddress(std::move(udpSocket.m_boundAddress))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace Nz
|
|||
|
||||
PhysWorld3D();
|
||||
PhysWorld3D(const PhysWorld3D&) = delete;
|
||||
PhysWorld3D(PhysWorld3D&&) = default;
|
||||
PhysWorld3D(PhysWorld3D&&) noexcept = default;
|
||||
~PhysWorld3D();
|
||||
|
||||
int CreateMaterial(String name = String());
|
||||
|
|
@ -61,7 +61,7 @@ namespace Nz
|
|||
void Step(float timestep);
|
||||
|
||||
PhysWorld3D& operator=(const PhysWorld3D&) = delete;
|
||||
PhysWorld3D& operator=(PhysWorld3D&&) = default;
|
||||
PhysWorld3D& operator=(PhysWorld3D&&) noexcept = default;
|
||||
|
||||
private:
|
||||
struct Callback
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ namespace Nz
|
|||
public:
|
||||
CursorController() = default;
|
||||
CursorController(const CursorController&) = delete;
|
||||
CursorController(CursorController&&) = default;
|
||||
CursorController(CursorController&&) noexcept = default;
|
||||
~CursorController() = default;
|
||||
|
||||
inline void UpdateCursor(const CursorRef& cursor);
|
||||
|
||||
CursorController& operator=(const CursorController&) = delete;
|
||||
CursorController& operator=(CursorController&&) = default;
|
||||
CursorController& operator=(CursorController&&) noexcept = default;
|
||||
|
||||
NazaraSignal(OnCursorUpdated, const CursorController* /*cursorController*/, const CursorRef& /*cursor*/);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ namespace Nz
|
|||
public:
|
||||
EventHandler() = default;
|
||||
explicit EventHandler(const EventHandler&);
|
||||
EventHandler(EventHandler&&) = default;
|
||||
EventHandler(EventHandler&&) noexcept = default;
|
||||
~EventHandler() = default;
|
||||
|
||||
inline void Dispatch(const WindowEvent& event);
|
||||
|
||||
EventHandler& operator=(const EventHandler&) = delete;
|
||||
EventHandler& operator=(EventHandler&&) = default;
|
||||
EventHandler& operator=(EventHandler&&) noexcept = default;
|
||||
|
||||
NazaraSignal(OnEvent, const EventHandler* /*eventHandler*/, const WindowEvent& /*event*/);
|
||||
NazaraSignal(OnGainedFocus, const EventHandler* /*eventHandler*/);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace Nz
|
|||
Buffer(BufferType type);
|
||||
Buffer(BufferType type, UInt32 size, DataStorage storage = DataStorage_Software, BufferUsageFlags usage = 0);
|
||||
Buffer(const Buffer&) = delete;
|
||||
Buffer(Buffer&&) = default;
|
||||
Buffer(Buffer&&) = delete;
|
||||
~Buffer();
|
||||
|
||||
bool CopyContent(const BufferRef& buffer);
|
||||
|
|
@ -61,7 +61,7 @@ namespace Nz
|
|||
void Unmap() const;
|
||||
|
||||
Buffer& operator=(const Buffer&) = delete;
|
||||
Buffer& operator=(Buffer&&) = default;
|
||||
Buffer& operator=(Buffer&&) = delete;
|
||||
|
||||
static bool IsStorageSupported(DataStorage storage);
|
||||
template<typename... Args> static BufferRef New(Args&&... args);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2017 Jérôme Leclercq
|
||||
// Copyright (C) 2017 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Utility module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ namespace Nz
|
|||
* \param abstractSocket AbstractSocket to move into this
|
||||
*/
|
||||
|
||||
AbstractSocket::AbstractSocket(AbstractSocket&& abstractSocket) :
|
||||
AbstractSocket::AbstractSocket(AbstractSocket&& abstractSocket) noexcept :
|
||||
m_protocol(abstractSocket.m_protocol),
|
||||
m_lastError(abstractSocket.m_lastError),
|
||||
m_handle(abstractSocket.m_handle),
|
||||
|
|
|
|||
|
|
@ -489,7 +489,7 @@ namespace Nz
|
|||
if (m_receivedDataLength < NazaraOffsetOf(ENetProtocolHeader, sentTime))
|
||||
return false;
|
||||
|
||||
ENetProtocolHeader* header = reinterpret_cast<ENetProtocolHeader*>(m_receivedData);
|
||||
ENetProtocolHeader* header = reinterpret_cast<ENetProtocolHeader*>(m_receivedData.Get());
|
||||
|
||||
UInt16 peerID = NetToHost(header->peerID);
|
||||
UInt8 sessionID = (peerID & ENetProtocolHeaderSessionMask) >> ENetProtocolHeaderSessionShift;
|
||||
|
|
|
|||
Loading…
Reference in New Issue