VirtualBox

Changeset 21393 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jul 8, 2009 1:02:09 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
49763
Message:

IPRT, Main: make ministring throw std::bad_alloc on allocation failure; remove isEmpty() and isNull(), change Main code to using length() instead

Location:
trunk/src/VBox/Frontends
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp

    r20928 r21393  
    750750    }
    751751
    752     if (rawdisk.isEmpty())
     752    if (!rawdisk.length())
    753753        return errorSyntax(USAGE_LISTPARTITIONS, "Mandatory parameter -rawdisk missing");
    754754
     
    865865    if (filename.isEmpty())
    866866        return errorSyntax(USAGE_CREATERAWVMDK, "Mandatory parameter -filename missing");
    867     if (rawdisk.isEmpty())
     867    if (!rawdisk.length())
    868868        return errorSyntax(USAGE_CREATERAWVMDK, "Mandatory parameter -rawdisk missing");
    869869    if (!pszPartitions && pszMBRFilename)
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp

    r20928 r21393  
    167167    {
    168168        HRESULT rc = S_OK;
    169         Utf8Str utf8Name (name);
     169        Utf8Str utf8Name(name);
    170170        Guid uuid(machineId);
    171         if (utf8Name.isNull())
    172             rc = E_OUTOFMEMORY;
    173171        if (   SUCCEEDED (rc)
    174172            && uuid == mUuid
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageImport.cpp

    r21369 r21393  
    202202
    203203            case VINF_GETOPT_NOT_OPTION:
    204                 if (strOvfFilename.isEmpty())
     204                if (!strOvfFilename.length())
    205205                    strOvfFilename = ValueUnion.psz;
    206206                else
     
    225225    }
    226226
    227     if (strOvfFilename.isEmpty())
     227    if (!strOvfFilename.length())
    228228        return errorSyntax(USAGE_IMPORTAPPLIANCE, "Not enough arguments for \"import\" command.");
    229229
  • trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp

    r21369 r21393  
    11781178    /* now the text */
    11791179    if (    mLabelFont != NULL
    1180          && !mSecureLabelText.isEmpty()
     1180         && mSecureLabelText.length()
    11811181       )
    11821182    {
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