Unverified Commit 47b589bd authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

add [[ noreturn ]] attributes to functions in the Error class that do not return

parent d8fbb5a1
Loading
Loading
Loading
Loading
+5 −5
Changes for src/error.h: 5 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -27,15 +27,15 @@ class Error : protected Pointers {
 public:
  Error(class LAMMPS *);

  void universe_all(const std::string &, int, const std::string &);
  void universe_one(const std::string &, int, const std::string &);
  [[ noreturn ]] void universe_all(const std::string &, int, const std::string &);
  [[ noreturn ]] void universe_one(const std::string &, int, const std::string &);
  void universe_warn(const std::string &, int, const std::string &);

  void all(const std::string &, int, const std::string &);
  void one(const std::string &, int, const std::string &);
  [[ noreturn ]] void all(const std::string &, int, const std::string &);
  [[ noreturn ]] void one(const std::string &, int, const std::string &);
  void warning(const std::string &, int, const std::string &, int = 1);
  void message(const std::string &, int, const std::string &, int = 1);
  void done(int = 0); // 1 would be fully backwards compatible
  [[ noreturn ]] void done(int = 0); // 1 would be fully backwards compatible

#ifdef LAMMPS_EXCEPTIONS
  std::string get_last_error() const;