From 99118281ac361fcda79d5c6aed7e6ce106fae8eb Mon Sep 17 00:00:00 2001 From: Jesper Andersson <jesper.andersson@ndcn.ox.ac.uk> Date: Tue, 1 Feb 2022 13:14:48 +0000 Subject: [PATCH] Changed SplinterpolatorException class to avoid compiler warnings --- splinterpolator.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/splinterpolator.h b/splinterpolator.h index 6366b83..87a9c95 100644 --- a/splinterpolator.h +++ b/splinterpolator.h @@ -24,16 +24,12 @@ enum ExtrapolationType {Zeros, Constant, Mirror, Periodic}; class SplinterpolatorException: public std::exception { +public: + SplinterpolatorException(const std::string& msg) noexcept : m_msg(std::string("Splinterpolator::") + msg) {} + ~SplinterpolatorException() noexcept {} + virtual const char *what() const noexcept { return(m_msg.c_str()); } private: std::string m_msg; -public: - SplinterpolatorException(const std::string& msg) throw(): m_msg(msg) {} - - virtual const char *what() const throw() { - return std::string("Splinterpolator::" + m_msg).c_str(); - } - - ~SplinterpolatorException() throw() {} }; //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -- GitLab