Fix some minor stuff

This commit is contained in:
Jérôme Leclercq
2020-09-06 17:09:39 +02:00
parent 67b0d70b7c
commit 193deb6c04
10 changed files with 96 additions and 94 deletions

View File

@@ -26,7 +26,7 @@ namespace Nz
{
public:
AbstractBackground() = default;
AbstractBackground(const AbstractBackground&) = default;
AbstractBackground(const AbstractBackground&) = delete;
AbstractBackground(AbstractBackground&&) = delete;
virtual ~AbstractBackground();
@@ -34,7 +34,7 @@ namespace Nz
virtual BackgroundType GetBackgroundType() const = 0;
AbstractBackground& operator=(const AbstractBackground&) = default;
AbstractBackground& operator=(const AbstractBackground&) = delete;
AbstractBackground& operator=(AbstractBackground&&) = delete;
private:

View File

@@ -126,7 +126,7 @@ namespace Nz
template<typename T>
void SinCos(std::enable_if_t<std::is_same<T, long double>::value, long double> x, long double* s, long double* c)
{
::sincosl(x, sin, cos);
::sincosl(x, s, c);
}
#else
// Naive implementation, hopefully optimized by the compiler

View File

@@ -22,7 +22,7 @@ namespace Nz
AbstractSocket(AbstractSocket&& abstractSocket) noexcept;
virtual ~AbstractSocket();
void Close();
void Close() noexcept;
void EnableBlocking(bool blocking);
@@ -41,7 +41,7 @@ namespace Nz
void SetSendBufferSize(std::size_t size);
AbstractSocket& operator=(const AbstractSocket&) = delete;
AbstractSocket& operator=(AbstractSocket&& abstractSocket);
AbstractSocket& operator=(AbstractSocket&& abstractSocket) noexcept;
// Signals:
NazaraSignal(OnStateChanged, const AbstractSocket* /*socket*/, SocketState /*oldState*/, SocketState /*newState*/);

View File

@@ -46,6 +46,9 @@ namespace Nz
bool SendMultiple(const IpAddress& to, const NetBuffer* buffers, std::size_t bufferCount, std::size_t* sent);
bool SendPacket(const IpAddress& to, const NetPacket& packet);
UdpSocket& operator=(const UdpSocket& udpSocket) = delete;
UdpSocket& operator=(UdpSocket && udpSocket) noexcept = default;
private:
void OnClose() override;
void OnOpened() override;