VirtualBox

Changeset 55950 in vbox for trunk/include/iprt


Ignore:
Timestamp:
May 19, 2015 11:46:52 PM (10 years ago)
Author:
vboxsync
Message:

iprt/mem.h: Replaced two RT_UNLIKELY occurences with RT_LIKELY.

File:
1 edited

Legend:

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

    r52021 r55950  
    752752        { \
    753753            void *pv = RTMemEfAlloc(cb, RTMEM_TAG, RT_SRC_POS); \
    754             if (RT_UNLIKELY(!pv)) \
    755                 throw std::bad_alloc(); \
    756             return pv; \
     754            if (RT_LIKELY(pv)) \
     755                return pv; \
     756            throw std::bad_alloc(); \
    757757        } \
    758758        void *operator new(size_t cb, const std::nothrow_t &nothrow_constant) RT_NO_THROW \
     
    764764        { \
    765765            void *pv = RTMemEfAlloc(cb, RTMEM_TAG, RT_SRC_POS); \
    766             if (RT_UNLIKELY(!pv)) \
    767                 throw std::bad_alloc(); \
    768             return pv; \
     766            if (RT_LIKELY(pv)) \
     767                return pv; \
     768            throw std::bad_alloc(); \
    769769        } \
    770770        void *operator new[](size_t cb, const std::nothrow_t &nothrow_constant) RT_NO_THROW \
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