VirtualBox

Changeset 29931 in vbox for trunk


Ignore:
Timestamp:
Jun 1, 2010 1:35:14 AM (15 years ago)
Author:
vboxsync
Message:

com/ptr.h, com/array.h: Added isNotNull() methods. It is easier to read if (ptrSomething.isNotNull()) than if (!ptrSomething->isNull()) because of the double negation in the latter case. (Easier for people not used to double negation from their native tongue, anyway.)

Location:
trunk/include/VBox/com
Files:
2 edited

Legend:

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

    r28800 r29931  
    710710     */
    711711    bool isNull() const { return m.arr == NULL; }
     712
     713    /**
     714     * Returns @c true if this instance does not represents a null array.
     715     */
     716    bool isNotNull() const { return m.arr != NULL; }
    712717
    713718    /**
  • trunk/include/VBox/com/ptr.h

    r29929 r29931  
    200200    {
    201201        return (p == NULL);
     202    }
     203
     204    bool isNotNull() const
     205    {
     206        return (p != NULL);
    202207    }
    203208
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