VirtualBox

Changeset 52580 in vbox for trunk/include/iprt/cpp


Ignore:
Timestamp:
Sep 3, 2014 12:01:02 PM (10 years ago)
Author:
vboxsync
Message:

algorithm or something it needs is missing in one of the additions toolchains.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/cpp/ministring.h

    r52549 r52580  
    3333
    3434#include <new>
    35 #include <algorithm>
    3635
    3736
     
    880879    /**
    881880     * Swaps two strings in a fast way.
     881     *
    882882     * Exception safe.
    883883     *
    884      * @param   that  the string to swap for */
    885     inline void swap(RTCString &that) throw()
    886     {
    887         std::swap(m_psz, that.m_psz);
    888         std::swap(m_cch, that.m_cch);
    889         std::swap(m_cbAllocated, that.m_cbAllocated);
     884     * @param   a_rThat  The string to swap with.
     885     */
     886    inline void swap(RTCString &a_rThat) throw()
     887    {
     888        char   *pszTmp         = m_psz;
     889        size_t  cchTmp         = m_cch;
     890        size_t  cbAllocatedTmp = m_cbAllocated;
     891
     892        m_psz                  = a_rThat.m_psz;
     893        m_cch                  = a_rThat.m_cch;
     894        m_cbAllocated          = a_rThat.m_cbAllocated;
     895
     896        a_rThat.m_psz          = pszTmp;
     897        a_rThat.m_cch          = cchTmp;
     898        a_rThat.m_cbAllocated  = cbAllocatedTmp;
    890899    }
    891900
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