dtoolutil: Rename Filename::__nonzero__() to __bool__()

This is the Python 3 convention (even though interrogate supports both)
This commit is contained in:
rdb 2021-03-09 19:35:09 +01:00
parent e4ecb548bf
commit fd5cab1a3f
2 changed files with 2 additions and 2 deletions

View File

@ -608,7 +608,7 @@ compare_to(const Filename &other) const {
* instead. * instead.
*/ */
INLINE bool Filename:: INLINE bool Filename::
__nonzero__() const { __bool__() const {
return !_filename.empty(); return !_filename.empty();
} }

View File

@ -232,7 +232,7 @@ PUBLISHED:
INLINE bool operator != (const std::string &other) const; INLINE bool operator != (const std::string &other) const;
INLINE bool operator < (const std::string &other) const; INLINE bool operator < (const std::string &other) const;
INLINE int compare_to(const Filename &other) const; INLINE int compare_to(const Filename &other) const;
INLINE bool __nonzero__() const; INLINE bool __bool__() const;
int get_hash() const; int get_hash() const;
INLINE void output(std::ostream &out) const; INLINE void output(std::ostream &out) const;