VirtualBox

Changeset 52554 in vbox


Ignore:
Timestamp:
Sep 1, 2014 4:00:05 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
95815
Message:

VBox/Main: #1909: Bug & coding style fixes.

Location:
trunk
Files:
2 edited

Legend:

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

    r52546 r52554  
    514514    }
    515515
    516     Utf8Str(CBSTR that, size_t a_cchSize = RTSTR_MAX)
    517     {
    518         copyFrom(that, a_cchSize);
     516    Utf8Str(CBSTR that, size_t a_cwcSize = RTSTR_MAX)
     517    {
     518        copyFrom(that, a_cwcSize);
    519519    }
    520520
     
    718718protected:
    719719
    720     void copyFrom(CBSTR a_pbstr, size_t a_cchSize = RTSTR_MAX);
     720    void copyFrom(CBSTR a_pbstr, size_t a_cwcMax = RTSTR_MAX);
    721721    HRESULT copyFromEx(CBSTR a_pbstr);
    722722    HRESULT copyFromExNComRC(const char *a_pcszSrc, size_t a_offSrc, size_t a_cchSrc);
  • trunk/src/VBox/Main/glue/string.cpp

    r52546 r52554  
    179179 * @param   a_pbstr         The source string.  The caller guarantees that this
    180180 *                          is valid UTF-16.
    181  * @param   a_cbSize        The number of characters to be copied. If set to RTSTR_MAX,
     181 * @param   a_cwcMax        The number of characters to be copied. If set to RTSTR_MAX,
    182182 *                          the entire string will be copied.
    183183 *
    184184 * @sa      RTCString::copyFromN
    185185 */
    186 void Utf8Str::copyFrom(CBSTR a_pbstr, size_t a_cchSize)
     186void Utf8Str::copyFrom(CBSTR a_pbstr, size_t a_cwcMax)
    187187{
    188188    if (a_pbstr && *a_pbstr)
    189189    {
    190190        int vrc = RTUtf16ToUtf8Ex((PCRTUTF16)a_pbstr,
    191                                   a_cchSize,        // size_t cwcString: translate entire string
     191                                  a_cwcMax,        // size_t cwcString: translate entire string
    192192                                  &m_psz,           // char **ppsz: output buffer
    193193                                  0,                // size_t cch: if 0, func allocates buffer in *ppsz
Note: See TracChangeset for help on using the changeset viewer.

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