From 2107a2205a8b310577b2c3ec4114e70e43cb382a Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 22 Sep 2015 16:20:19 +0300 Subject: [PATCH] Remove NORET_ATTR. --HG-- branch : develop --- src/app/valentina/core/vcmdexport.cpp | 2 +- src/app/valentina/core/vcmdexport.h | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/app/valentina/core/vcmdexport.cpp b/src/app/valentina/core/vcmdexport.cpp index e965f2297..82de220ef 100644 --- a/src/app/valentina/core/vcmdexport.cpp +++ b/src/app/valentina/core/vcmdexport.cpp @@ -295,7 +295,7 @@ VCommandLinePtr VCommandLine::Get(const QCoreApplication& app) } //------------------------------------------------------------------------------------------------------ -NORET_ATTR void VCommandLine::Error(const QString &text) const +Q_NORETURN void VCommandLine::Error(const QString &text) const { vStdErr() << text << "\n"; const_cast(this)->parser.showHelp(FAILED_HELP_SHOWN_STATUS); diff --git a/src/app/valentina/core/vcmdexport.h b/src/app/valentina/core/vcmdexport.h index 5c1b9112b..b69e0e9a5 100644 --- a/src/app/valentina/core/vcmdexport.h +++ b/src/app/valentina/core/vcmdexport.h @@ -18,9 +18,6 @@ constexpr auto FAILED_TO_GEN_LAYOUT_STATUS = 253; constexpr auto FAILED_HELP_SHOWN_STATUS = 250; constexpr auto FAILED_GEN_BASE_STATUS = 240; -#define NORET_ATTR Q_NORETURN - - //--------------------------------------------------------------------------------------------------------------------- inline QTextStream& vStdErr() { @@ -29,7 +26,7 @@ inline QTextStream& vStdErr() } //--------------------------------------------------------------------------------------------------------------------- -NORET_ATTR inline void AppAbort(const QString& text = QString(), int code = GENERAL_ERROR_STATUS) +Q_NORETURN inline void AppAbort(const QString& text = QString(), int code = GENERAL_ERROR_STATUS) { //well ..std::runtime_error was leading to zombies in memory and a lot of dumping all the time ...better to do just exit //possibly compiler do not have -fexceptions set @@ -71,7 +68,7 @@ protected: Cases OptGroup() const; //@brief convinient shortcut to show error and help and exit - NORET_ATTR void Error(const QString& text) const; + Q_NORETURN void Error(const QString& text) const; //@brief: called in destructor of application, so instance destroyed and new maybe created (never happen scenario though) static void Reset();