Skip to content

Commit 7b3258c

Browse files
authored
Merge pull request #2 from micpub/master
fix: MSVC compile errors
2 parents 728c7d0 + 6274b62 commit 7b3258c

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

WebSocket.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
#include <memory>
5151
#if defined(Q_OS_WINDOWS)
5252
#define WIN32_LEAN_AND_MEAN 1
53+
#define NOMINMAX
5354
# include <windows.h>
5455
#endif
5556

WebSocket.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <QTcpSocket>
3333

3434
#include <cstddef>
35+
#include <stdexcept>
3536
#include <exception>
3637
#include <list>
3738
#include <optional>
@@ -50,16 +51,16 @@ class QTimer;
5051
namespace WebSocket
5152
{
5253
/// All exceptions thrown by the code below are derived from this base type.
53-
struct Exception : public std::runtime_error { Exception(const QString &s); ~Exception() override; };
54+
struct Exception : public std::runtime_error { Exception(const QString &s); ~Exception(); };
5455
/// May be thrown by the various Ser and Deser functions if the arguments supplied are bad.
55-
struct BadArgs : public Exception { using Exception::Exception; ~BadArgs() override; };
56+
struct BadArgs : public Exception { using Exception::Exception; ~BadArgs(); };
5657
/// May be thrown in rare cases if there are assertion failure in the code (shouldn't normally happen).
57-
struct InternalError : public Exception { using Exception::Exception; ~InternalError() override; };
58+
struct InternalError : public Exception { using Exception::Exception; ~InternalError(); };
5859
/// All higher level errors are a type of this exception (but some functions may throw BadArgs or InternalError
5960
/// as well)
60-
struct Error : public Exception { using Exception::Exception; ~Error() override; };
61+
struct Error : public Exception { using Exception::Exception; ~Error(); };
6162
/// Thrown if the parsed or generated data exceeds INT_MAX
62-
struct MessageTooBigError : public Error { using Error::Error; ~MessageTooBigError() override; };
63+
struct MessageTooBigError : public Error { using Error::Error; ~MessageTooBigError(); };
6364

6465
/// Default to 4096-byte fragments.
6566
inline constexpr std::size_t DefaultFragmentSize = 4096;
@@ -212,7 +213,7 @@ namespace WebSocket
212213
};
213214

214215
/// Thrown if the incoming wire data is out-of-spec and/or invalid.
215-
struct ProtocolError : public Error { using Error::Error; ~ProtocolError() override; };
216+
struct ProtocolError : public Error { using Error::Error; ~ProtocolError(); };
216217

217218
enum MaskEnforcement {
218219
DontCare = 0,

0 commit comments

Comments
 (0)