mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-24 06:45:03 +00:00
style: clang-tidy: modernize-use-override
This commit is contained in:
committed by
Henry Schreiner
parent
8dc31c7b29
commit
5dfbe6f903
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user