Skip to content

Commit 8ac9578

Browse files
nehebkjellahl
authored andcommitted
clang-tidy: use override
Found with modernize-use-override Signed-off-by: Rosen Penev <rosenp@gmail.com>
1 parent e1cf8e7 commit 8ac9578

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

libxml++/validators/schemavalidatorbase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class SchemaValidatorBase : public Validator
7070
* @endcode
7171
*/
7272
LIBXMLPP_API
73-
explicit virtual operator bool() const noexcept override = 0;
73+
explicit operator bool() const noexcept override = 0;
7474

7575
/** Validate a document, using a previously parsed schema.
7676
* @param document Pointer to the document.

tests/istream_ioparser/main.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,30 +36,30 @@ class test_streambuf : public std::streambuf
3636

3737
protected:
3838
/* Simulate some kind of streambuf impl that doesn't setg() */
39-
virtual int_type underflow() override final
39+
int_type underflow() final
4040
{
4141
++underflow_calls;
4242
if (ofs >= (sizeof(buf)-1))
4343
return traits_type::eof();
4444
return traits_type::to_int_type(buf[ofs]);
4545
}
4646

47-
virtual int_type uflow() override final
47+
int_type uflow() final
4848
{
4949
++uflow_calls;
5050
if (ofs >= (sizeof(buf)-1))
5151
return traits_type::eof();
5252
return traits_type::to_int_type(buf[ofs++]);
5353
}
5454

55-
virtual std::streamsize showmanyc() override final
55+
std::streamsize showmanyc() final
5656
{
5757
if (ofs >= (sizeof(buf)-1))
5858
return traits_type::eof();
5959
return sizeof(buf)-1-ofs;
6060
}
6161

62-
virtual std::streamsize xsgetn(char_type* s, std::streamsize count) override final
62+
std::streamsize xsgetn(char_type* s, std::streamsize count) final
6363
{
6464
auto n = std::min(count, static_cast<std::streamsize>(sizeof(buf)-1-ofs));
6565
memcpy(s, buf + ofs, n);
@@ -80,11 +80,11 @@ class MySaxParser : public xmlpp::SaxParser {
8080
public:
8181
bool saw_root = false;
8282
protected:
83-
virtual void on_start_document() override final
83+
void on_start_document() final
8484
{
8585
saw_root = false;
8686
}
87-
virtual void on_end_element(const xmlpp::ustring &name) override final
87+
void on_end_element(const xmlpp::ustring &name) final
8888
{
8989
if (name == "root")
9090
saw_root = true;

0 commit comments

Comments
 (0)