Browse Source

Super effective exception constructor

cl-refactor
arkpar 10 years ago
parent
commit
e2fe258d41
  1. 2
      libdevcore/Exceptions.h

2
libdevcore/Exceptions.h

@ -33,7 +33,7 @@ namespace dev
// base class for all exceptions // base class for all exceptions
struct Exception: virtual std::exception, virtual boost::exception struct Exception: virtual std::exception, virtual boost::exception
{ {
Exception(std::string _message = std::string()): m_message(_message) {} Exception(std::string _message = {}) : m_message(std::move(_message)) {}
const char* what() const noexcept override { return m_message.c_str(); } const char* what() const noexcept override { return m_message.c_str(); }
private: private:
std::string m_message; std::string m_message;

Loading…
Cancel
Save