From d1505693ddcc2c29e71e912f3fc32d2408aeaff7 Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Mon, 15 Jul 2024 10:48:02 -0700 Subject: [PATCH] throw() -> noexcept --- modules/core/include/opencv2/core.hpp | 4 ++-- modules/core/src/system.cpp | 4 ++-- modules/videoio/src/cap_gphoto2.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/core/include/opencv2/core.hpp b/modules/core/include/opencv2/core.hpp index b58a3a6ccb..0a25e2a47b 100644 --- a/modules/core/include/opencv2/core.hpp +++ b/modules/core/include/opencv2/core.hpp @@ -123,12 +123,12 @@ public: Instead, the macros CV_Error(), CV_Error_() and CV_Assert() are used. */ Exception(int _code, const String& _err, const String& _func, const String& _file, int _line); - virtual ~Exception() throw(); + virtual ~Exception() CV_NOEXCEPT; /*! \return the error description and the context as a text string. */ - virtual const char *what() const throw() CV_OVERRIDE; + virtual const char *what() const CV_NOEXCEPT CV_OVERRIDE; void formatMessage(); String msg; ///< the formatted error message diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp index 8d72d64f87..9d5304ac5a 100644 --- a/modules/core/src/system.cpp +++ b/modules/core/src/system.cpp @@ -318,12 +318,12 @@ Exception::Exception(int _code, const String& _err, const String& _func, const S formatMessage(); } -Exception::~Exception() throw() {} +Exception::~Exception() CV_NOEXCEPT {} /*! \return the error description and the context as a text string. */ -const char* Exception::what() const throw() { return msg.c_str(); } +const char* Exception::what() const CV_NOEXCEPT { return msg.c_str(); } void Exception::formatMessage() { diff --git a/modules/videoio/src/cap_gphoto2.cpp b/modules/videoio/src/cap_gphoto2.cpp index 8b3898b2ad..d5e787f907 100644 --- a/modules/videoio/src/cap_gphoto2.cpp +++ b/modules/videoio/src/cap_gphoto2.cpp @@ -65,7 +65,7 @@ public: result = gPhoto2Result; method = methodStr; } - virtual const char * what() const throw() CV_OVERRIDE + virtual const char * what() const CV_NOEXCEPT CV_OVERRIDE { return gp_result_as_string(result); }