Skip to content

Commit 44ae82b

Browse files
committed
tests/istream_ioparser/main.cc: Replace final by override
gcc 8 does not understand that final implies override.
1 parent 8ac9578 commit 44ae82b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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-
int_type underflow() final
39+
int_type underflow() override
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-
int_type uflow() final
47+
int_type uflow() override
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-
std::streamsize showmanyc() final
55+
std::streamsize showmanyc() override
5656
{
5757
if (ofs >= (sizeof(buf)-1))
5858
return traits_type::eof();
5959
return sizeof(buf)-1-ofs;
6060
}
6161

62-
std::streamsize xsgetn(char_type* s, std::streamsize count) final
62+
std::streamsize xsgetn(char_type* s, std::streamsize count) override
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-
void on_start_document() final
83+
void on_start_document() override
8484
{
8585
saw_root = false;
8686
}
87-
void on_end_element(const xmlpp::ustring &name) final
87+
void on_end_element(const xmlpp::ustring &name) override
8888
{
8989
if (name == "root")
9090
saw_root = true;

0 commit comments

Comments
 (0)