Browse Source

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

This is the Python 3 convention (even though interrogate supports both)
rdb 4 years ago
parent
commit
fd5cab1a3f
2 changed files with 2 additions and 2 deletions
  1. 1 1
      dtool/src/dtoolutil/filename.I
  2. 1 1
      dtool/src/dtoolutil/filename.h

+ 1 - 1
dtool/src/dtoolutil/filename.I

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

+ 1 - 1
dtool/src/dtoolutil/filename.h

@@ -232,7 +232,7 @@ PUBLISHED:
   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 bool __nonzero__() const;
+  INLINE bool __bool__() const;
   int get_hash() const;
 
   INLINE void output(std::ostream &out) const;