Apply override to Reader classes

This commit is contained in:
Richard Berger
2022-01-18 14:39:31 -05:00
parent d19f799585
commit 1792b3b0cf
4 changed files with 13 additions and 13 deletions

View File

@ -23,7 +23,7 @@ namespace LAMMPS_NS {
class Reader : protected Pointers { class Reader : protected Pointers {
public: public:
Reader(class LAMMPS *); Reader(class LAMMPS *);
virtual ~Reader() {} ~Reader() override {}
virtual void settings(int, char **); virtual void settings(int, char **);

View File

@ -32,13 +32,13 @@ namespace LAMMPS_NS {
class ReaderNative : public Reader { class ReaderNative : public Reader {
public: public:
ReaderNative(class LAMMPS *); ReaderNative(class LAMMPS *);
~ReaderNative(); ~ReaderNative() override;
int read_time(bigint &); int read_time(bigint &) override;
void skip(); void skip() override;
bigint read_header(double[3][3], int &, int &, int, int, int *, char **, int, int, int &, int &, bigint read_header(double[3][3], int &, int &, int, int, int *, char **, int, int, int &, int &,
int &, int &); int &, int &) override;
void read_atoms(int, int, double **); void read_atoms(int, int, double **) override;
private: private:
int revision; int revision;

View File

@ -29,13 +29,13 @@ namespace LAMMPS_NS {
class ReaderXYZ : public Reader { class ReaderXYZ : public Reader {
public: public:
ReaderXYZ(class LAMMPS *); ReaderXYZ(class LAMMPS *);
~ReaderXYZ(); ~ReaderXYZ() override;
int read_time(bigint &); int read_time(bigint &) override;
void skip(); void skip() override;
bigint read_header(double[3][3], int &, int &, int, int, int *, char **, int, int, int &, int &, bigint read_header(double[3][3], int &, int &, int, int, int *, char **, int, int, int &, int &,
int &, int &); int &, int &) override;
void read_atoms(int, int, double **); void read_atoms(int, int, double **) override;
private: private:
char *line; // line read from dump file char *line; // line read from dump file

View File

@ -62,11 +62,11 @@ class TokenizerException : public std::exception {
* \param token String of the token/word that caused the error */ * \param token String of the token/word that caused the error */
explicit TokenizerException(const std::string &msg, const std::string &token); explicit TokenizerException(const std::string &msg, const std::string &token);
~TokenizerException() noexcept {} ~TokenizerException() noexcept override {}
/** Retrieve message describing the thrown exception /** Retrieve message describing the thrown exception
* \return string with error message */ * \return string with error message */
virtual const char *what() const noexcept { return message.c_str(); } const char *what() const noexcept override { return message.c_str(); }
}; };
class InvalidIntegerException : public TokenizerException { class InvalidIntegerException : public TokenizerException {