Merge pull request #25914 from r-barnes:4.x

throw() -> noexcept
pull/25932/head
Alexander Smorkalov 4 months ago committed by GitHub
commit 0c2da1dc9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      modules/core/include/opencv2/core.hpp
  2. 4
      modules/core/src/system.cpp
  3. 2
      modules/videoio/src/cap_gphoto2.cpp

@ -123,12 +123,12 @@ public:
Instead, the macros CV_Error(), CV_Error_() and CV_Assert() are used. 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); 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. \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(); void formatMessage();
String msg; ///< the formatted error message String msg; ///< the formatted error message

@ -318,12 +318,12 @@ Exception::Exception(int _code, const String& _err, const String& _func, const S
formatMessage(); formatMessage();
} }
Exception::~Exception() throw() {} Exception::~Exception() CV_NOEXCEPT {}
/*! /*!
\return the error description and the context as a text string. \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() void Exception::formatMessage()
{ {

@ -65,7 +65,7 @@ public:
result = gPhoto2Result; result = gPhoto2Result;
method = methodStr; 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); return gp_result_as_string(result);
} }

Loading…
Cancel
Save