style: clang-tidy: modernize-use-override

This commit is contained in:
Henry Schreiner
2020-09-10 22:43:53 -04:00
committed by Henry Schreiner
parent 8dc31c7b29
commit 5dfbe6f903
7 changed files with 20 additions and 20 deletions

View File

@@ -30,7 +30,7 @@ private:
object pywrite;
object pyflush;
int overflow(int c) {
int overflow(int c) override {
if (!traits_type::eq_int_type(c, traits_type::eof())) {
*pptr() = traits_type::to_char_type(c);
pbump(1);
@@ -38,7 +38,7 @@ private:
return sync() == 0 ? traits_type::not_eof(c) : traits_type::eof();
}
int sync() {
int sync() override {
if (pbase() != pptr()) {
// This subtraction cannot be negative, so dropping the sign
str line(pbase(), static_cast<size_t>(pptr() - pbase()));
@@ -67,7 +67,7 @@ public:
pythonbuf(pythonbuf&&) = default;
/// Sync before destroy
~pythonbuf() {
~pythonbuf() override {
sync();
}
};

View File

@@ -331,7 +331,7 @@ public:
error_already_set(const error_already_set &) = default;
error_already_set(error_already_set &&) = default;
inline ~error_already_set();
inline ~error_already_set() override;
/// Give the currently-held error back to Python, if any. If there is currently a Python error
/// already set it is cleared first. After this call, the current object no longer stores the