VirtualBox

Changeset 21360 in vbox for trunk/include


Ignore:
Timestamp:
Jul 7, 2009 4:33:26 PM (16 years ago)
Author:
vboxsync
Message:

IPRT: hide ministring::operator bool() to force people to use isEmpty() explicitly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/ministring_cpp.h

    r21358 r21360  
    308308    bool operator>(const char *that) const { return compare(that) > 0; }
    309309
    310     operator bool() const { return !isNull(); }
    311 
    312310protected:
     311
     312    /**
     313     * Hide operator bool() to force people to use isEmpty() explicitly.
     314     */
     315    operator bool() const { return false; }
     316
    313317    /**
    314318     *  Destructor implementation, also used to clean up in operator=()
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette