From 6558fca4a1f9cbb7ccddc550b9b3982ce37acaf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francesco=20Borz=C3=AC?= Date: Sun, 6 Dec 2020 22:44:38 +0100 Subject: [PATCH] refactor(Core): apply clang-tidy modernize-use-noexcept (#3837) --- src/common/Packets/ByteBuffer.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/common/Packets/ByteBuffer.h b/src/common/Packets/ByteBuffer.h index 7c9dbbf2f..2a6feeb23 100644 --- a/src/common/Packets/ByteBuffer.h +++ b/src/common/Packets/ByteBuffer.h @@ -22,12 +22,12 @@ class ByteBufferException : public std::exception { public: - ~ByteBufferException() throw() override { } + ~ByteBufferException() noexcept override { } - [[nodiscard]] char const* what() const throw() override { return msg_.c_str(); } + [[nodiscard]] char const* what() const noexcept override { return msg_.c_str(); } protected: - std::string& message() throw() { return msg_; } + std::string& message() noexcept { return msg_; } private: std::string msg_; @@ -37,8 +37,7 @@ class ByteBufferPositionException : public ByteBufferException { public: ByteBufferPositionException(bool add, size_t pos, size_t size, size_t valueSize); - - ~ByteBufferPositionException() throw() override { } + ~ByteBufferPositionException() noexcept override { } }; class ByteBufferSourceException : public ByteBufferException @@ -46,7 +45,7 @@ class ByteBufferSourceException : public ByteBufferException public: ByteBufferSourceException(size_t pos, size_t size, size_t valueSize); - ~ByteBufferSourceException() throw() override { } + ~ByteBufferSourceException() noexcept override { } }; class ByteBuffer