From 325c405541207e91110cc8e488c9210ddeb436f7 Mon Sep 17 00:00:00 2001 From: Yuriy Skalko Date: Tue, 28 Sep 2021 11:21:45 +0300 Subject: [PATCH] Remove redundant semicolons reported by GCC with -Wextra-semi option --- src/LyXRC.h | 2 +- src/Session.h | 2 +- src/VCBackend.h | 8 ++++---- src/frontends/qt/DialogView.h | 2 +- src/insets/InsetPreview.h | 2 +- src/lyxfind.cpp | 28 ++++++++++++++-------------- src/mathed/InsetMathGrid.h | 2 +- src/mathed/InsetMathMacroArgument.h | 2 +- src/mathed/MathStream.h | 2 +- src/support/Length.h | 4 ++-- src/xml.h | 2 +- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/LyXRC.h b/src/LyXRC.h index f9b56646ad..74c0e4cfe1 100644 --- a/src/LyXRC.h +++ b/src/LyXRC.h @@ -195,7 +195,7 @@ public: /// LyXRC() : user_name(support::user_name()), user_email(support::user_email()) // always empty - {}; + {} /// \param check_format: whether to try to convert the file format, /// if it is not current. this should only be true, really, for the diff --git a/src/Session.h b/src/Session.h index b7443b9cab..ea5175455d 100644 --- a/src/Session.h +++ b/src/Session.h @@ -361,7 +361,7 @@ class ShellEscapeSection : SessionSection { public: /// - explicit ShellEscapeSection() {}; + explicit ShellEscapeSection() {} /// void read(std::istream & is) override; diff --git a/src/VCBackend.h b/src/VCBackend.h index e7dc735b99..e0f6266513 100644 --- a/src/VCBackend.h +++ b/src/VCBackend.h @@ -154,7 +154,7 @@ public: /// get file from repo, the caller must ensure that it does not exist locally static bool retrieve(support::FileName const & file); - std::string vcname() const override { return "RCS"; }; + std::string vcname() const override { return "RCS"; } void registrer(std::string const & msg) override; @@ -247,7 +247,7 @@ public: /// get file from repo, the caller must ensure that it does not exist locally static bool retrieve(support::FileName const & file); - std::string vcname() const override { return "CVS"; }; + std::string vcname() const override { return "CVS"; } void registrer(std::string const & msg) override; @@ -393,7 +393,7 @@ public: /// get file from repo, the caller must ensure that it does not exist locally static bool retrieve(support::FileName const & file); - std::string vcname() const override { return "SVN"; }; + std::string vcname() const override { return "SVN"; } void registrer(std::string const & msg) override; @@ -504,7 +504,7 @@ public: /// get file from repo, the caller must ensure that it does not exist locally static bool retrieve(support::FileName const & file); - std::string vcname() const override { return "GIT"; }; + std::string vcname() const override { return "GIT"; } void registrer(std::string const & msg) override; diff --git a/src/frontends/qt/DialogView.h b/src/frontends/qt/DialogView.h index ee29471695..514242e926 100644 --- a/src/frontends/qt/DialogView.h +++ b/src/frontends/qt/DialogView.h @@ -47,7 +47,7 @@ protected: void hideEvent(QHideEvent * ev) override; protected Q_SLOTS: - void onBufferViewChanged() override {}; + void onBufferViewChanged() override {} }; } // namespace frontend diff --git a/src/insets/InsetPreview.h b/src/insets/InsetPreview.h index ca6641a886..f36ea56fa5 100644 --- a/src/insets/InsetPreview.h +++ b/src/insets/InsetPreview.h @@ -69,7 +69,7 @@ public: void edit(Cursor & cur, bool front, EntryDirection entry_from) override; - bool canPaintChange(BufferView const &) const override { return true; }; + bool canPaintChange(BufferView const &) const override { return true; } //@} protected: diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index 004e10b51e..4a8c0372df 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -935,7 +935,7 @@ public: int pos_len; int searched_size; vector result = vector (); - MatchResult(int len = 0): match_len(len),match_prefix(0),match2end(0), pos(0),leadsize(0),pos_len(-1),searched_size(0) {}; + MatchResult(int len = 0): match_len(len),match_prefix(0),match2end(0), pos(0),leadsize(0),pos_len(-1),searched_size(0) {} }; static MatchResult::range interpretMatch(MatchResult &oldres, MatchResult &newres) @@ -1248,7 +1248,7 @@ class KeyInfo { class Border { public: - Border(int l=0, int u=0) : low(l), upper(u) {}; + Border(int l=0, int u=0) : low(l), upper(u) {} int low; int upper; }; @@ -1920,7 +1920,7 @@ class LatexInfo { buildKeys(isPatternString); entries_ = vector(); buildEntries(isPatternString); - }; + } int getFirstKey() { entidx_ = 0; if (entries_.empty()) { @@ -1941,7 +1941,7 @@ class LatexInfo { return -1; } return 0; - }; + } int getNextKey() { entidx_++; if (int(entries_.size()) > entidx_) { @@ -1950,7 +1950,7 @@ class LatexInfo { else { return -1; } - }; + } bool setNextKey(int idx) { if ((idx == entidx_) && (entidx_ >= 0)) { entidx_--; @@ -1958,7 +1958,7 @@ class LatexInfo { } else return false; - }; + } int find(int start, KeyInfo::KeyType keytype) const { if (start < 0) return -1; @@ -1969,20 +1969,20 @@ class LatexInfo { tmpIdx++; } return -1; - }; + } int process(ostringstream & os, KeyInfo const & actual); int dispatch(ostringstream & os, int previousStart, KeyInfo & actual); - // string show(int lastpos) { return interval.show(lastpos);}; - int nextNotIgnored(int start) { return interval_.nextNotIgnored(start);}; + // string show(int lastpos) { return interval.show(lastpos);} + int nextNotIgnored(int start) { return interval_.nextNotIgnored(start);} KeyInfo &getKeyInfo(int keyinfo) { static KeyInfo invalidInfo = KeyInfo(); if ((keyinfo < 0) || ( keyinfo >= int(entries_.size()))) return invalidInfo; else return entries_[keyinfo]; - }; - void setForDefaultLang(KeyInfo const & defLang) {interval_.setForDefaultLang(defLang);}; - void addIntervall(int low, int up) { interval_.addIntervall(low, up); }; + } + void setForDefaultLang(KeyInfo const & defLang) {interval_.setForDefaultLang(defLang);} + void addIntervall(int low, int up) { interval_.addIntervall(low, up); } }; @@ -2036,7 +2036,7 @@ class MathInfo { m.mathSize = m.mathEnd - m.mathStart; entries_.push_back(m); } - bool empty() const { return entries_.empty(); }; + bool empty() const { return entries_.empty(); } size_t getEndPos() const { if (entries_.empty() || (actualIdx_ >= entries_.size())) { return 0; @@ -2071,7 +2071,7 @@ class MathInfo { } return entries_[actualIdx_].mathSize; } - void incrEntry() { actualIdx_++; }; + void incrEntry() { actualIdx_++; } }; void LatexInfo::buildEntries(bool isPatternString) diff --git a/src/mathed/InsetMathGrid.h b/src/mathed/InsetMathGrid.h index 70e9ddb4ca..ce8a852401 100644 --- a/src/mathed/InsetMathGrid.h +++ b/src/mathed/InsetMathGrid.h @@ -94,7 +94,7 @@ public: InsetMathGrid(Buffer * buf, col_type m, row_type n, char valign, docstring const & halign); /// - marker_type marker(BufferView const *) const override { return marker_type::MARKER2; }; + marker_type marker(BufferView const *) const override { return marker_type::MARKER2; } /// void metrics(MetricsInfo & mi, Dimension &) const override; /// diff --git a/src/mathed/InsetMathMacroArgument.h b/src/mathed/InsetMathMacroArgument.h index 441ac3266f..c11a9a6dbb 100644 --- a/src/mathed/InsetMathMacroArgument.h +++ b/src/mathed/InsetMathMacroArgument.h @@ -24,7 +24,7 @@ namespace lyx { // A # that failed to parse class InsetMathHash : public InsetMath { public: - explicit InsetMathHash(docstring const & str = docstring()) : str_('#' + str) {}; + explicit InsetMathHash(docstring const & str = docstring()) : str_('#' + str) {} /// void metrics(MetricsInfo & mi, Dimension & dim) const override; /// diff --git a/src/mathed/MathStream.h b/src/mathed/MathStream.h index d55831de37..d6a35c5e89 100644 --- a/src/mathed/MathStream.h +++ b/src/mathed/MathStream.h @@ -107,7 +107,7 @@ public: /// tell whether to use only ascii chars when producing latex code bool asciiOnly() const { return ascii_; } /// tell whether we are in a MathClass inset - void inMathClass(bool mathclass) { mathclass_ = mathclass; }; + void inMathClass(bool mathclass) { mathclass_ = mathclass; } /// tell whether we are in a MathClass inset bool inMathClass() const { return mathclass_; } /// LaTeX encoding diff --git a/src/support/Length.h b/src/support/Length.h index 03b4d366b0..cb612b6135 100644 --- a/src/support/Length.h +++ b/src/support/Length.h @@ -69,9 +69,9 @@ public: explicit Length(std::string const & data); /// - double value() const { return val_; }; + double value() const { return val_; } /// - Length::UNIT unit() const { return unit_; }; + Length::UNIT unit() const { return unit_; } /// void value(double val) { val_ = val; } /// diff --git a/src/xml.h b/src/xml.h index 471d925201..b3569baa79 100644 --- a/src/xml.h +++ b/src/xml.h @@ -101,7 +101,7 @@ public: /// Is the last tag that was added to the stream a new line (CR)? This is mostly to known /// whether a new line must be added. Therefore, consider that an empty stream just had a CR, /// that simplifies the logic using this code. - bool isLastTagCR() const { return is_last_tag_cr_; }; + bool isLastTagCR() const { return is_last_tag_cr_; } /// void writeError(std::string const &); /// -- 2.39.2