From a8775aee84b5fd61c007575e737759f8b5e19b56 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 5 Jan 2023 20:47:48 +0200 Subject: [PATCH] Remove redundant destructor declarations Destructors are implicitly noexcept in C++11. --- source/core/buffer.h | 1 - source/core/error.h | 6 ------ source/core/framebuffer.h | 1 - source/core/module.h | 1 - source/glsl/glsl_error.h | 4 ---- source/materials/programdata.h | 1 - source/resources/resourcemanager.h | 1 - 7 files changed, 15 deletions(-) diff --git a/source/core/buffer.h b/source/core/buffer.h index 37e042ec..7dde1ac3 100644 --- a/source/core/buffer.h +++ b/source/core/buffer.h @@ -12,7 +12,6 @@ class MSPGL_API buffer_too_small: public std::logic_error { public: buffer_too_small(const std::string &w): std::logic_error(w) { } - virtual ~buffer_too_small() throw() { } }; enum BufferUsage diff --git a/source/core/error.h b/source/core/error.h index 230a2617..9c6924c4 100644 --- a/source/core/error.h +++ b/source/core/error.h @@ -11,42 +11,36 @@ class MSPGL_API unsupported_extension: public std::runtime_error { public: unsupported_extension(const std::string &w): std::runtime_error(w) { } - virtual ~unsupported_extension() throw() { } }; class MSPGL_API invalid_operation: public std::logic_error { public: invalid_operation(const std::string &w): std::logic_error(w) { } - virtual ~invalid_operation() throw() { } }; class MSPGL_API stack_underflow: public std::logic_error { public: stack_underflow(const std::string &w): std::logic_error(w) { } - virtual ~stack_underflow() throw() { } }; class MSPGL_API incompatible_data: public std::logic_error { public: incompatible_data(const std::string &w): std::logic_error(w) { } - virtual ~incompatible_data() throw() { } }; class MSPGL_API compile_error: public std::runtime_error { public: compile_error(const std::string &w): std::runtime_error(w) { } - virtual ~compile_error() throw() { } }; class MSPGL_API incomplete_uniform_block: public std::runtime_error { public: incomplete_uniform_block(const std::string &w): std::runtime_error(w) { } - virtual ~incomplete_uniform_block() throw() { } }; } // namespace GL diff --git a/source/core/framebuffer.h b/source/core/framebuffer.h index 1222b304..10616175 100644 --- a/source/core/framebuffer.h +++ b/source/core/framebuffer.h @@ -20,7 +20,6 @@ class MSPGL_API framebuffer_incomplete: public std::runtime_error { public: framebuffer_incomplete(const std::string &); - virtual ~framebuffer_incomplete() throw() { } }; /** diff --git a/source/core/module.h b/source/core/module.h index 994aaca4..3c11f9d4 100644 --- a/source/core/module.h +++ b/source/core/module.h @@ -17,7 +17,6 @@ class MSPGL_API invalid_module: public std::runtime_error { public: invalid_module(const std::string &w): runtime_error(w) { } - virtual ~invalid_module() throw() { } }; class Resources; diff --git a/source/glsl/glsl_error.h b/source/glsl/glsl_error.h index 0a271994..bd6c4bb0 100644 --- a/source/glsl/glsl_error.h +++ b/source/glsl/glsl_error.h @@ -21,28 +21,24 @@ public: invalid_shader_source(loc, format(fmt, args...)) { } #endif - virtual ~invalid_shader_source() throw() { } }; class syntax_error: public invalid_shader_source { public: syntax_error(const Location &, const std::string &, const std::string &); - virtual ~syntax_error() throw() { } }; class parse_error: public invalid_shader_source { public: parse_error(const Location &, const std::string &, const std::string &); - virtual ~parse_error() throw() { } }; class internal_error: public std::logic_error { public: internal_error(const std::string &w): logic_error(w) { } - virtual ~internal_error() throw() { } }; struct Diagnostic diff --git a/source/materials/programdata.h b/source/materials/programdata.h index 3b45c5c0..6b168efb 100644 --- a/source/materials/programdata.h +++ b/source/materials/programdata.h @@ -18,7 +18,6 @@ class MSPGL_API too_many_uniforms: public std::runtime_error { public: too_many_uniforms(const std::string &w): std::runtime_error(w) { } - virtual ~too_many_uniforms() throw() { } }; class Buffer; diff --git a/source/resources/resourcemanager.h b/source/resources/resourcemanager.h index 04067da7..893f7601 100644 --- a/source/resources/resourcemanager.h +++ b/source/resources/resourcemanager.h @@ -21,7 +21,6 @@ class MSPGL_API resource_load_error: public std::runtime_error public: resource_load_error(const std::string &, const std::string &); resource_load_error(const std::string &, const std::exception &); - virtual ~resource_load_error() throw() { } }; -- 2.45.2