VirtualBox

Changeset 21369 in vbox for trunk/include


Ignore:
Timestamp:
Jul 7, 2009 6:52:12 PM (16 years ago)
Author:
vboxsync
Message:

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

Location:
trunk/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/com/string.h

    r21079 r21369  
    596596// work around error C2593 of the stupid MSVC 7.x ambiguity resolver
    597597WORKAROUND_MSVC7_ERROR_C2593_FOR_BOOL_OP (Bstr)
    598 WORKAROUND_MSVC7_ERROR_C2593_FOR_BOOL_OP (Utf8Str)
    599598
    600599////////////////////////////////////////////////////////////////////////////////
  • trunk/include/iprt/ministring_cpp.h

    r21362 r21369  
    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