VirtualBox

Changeset 21435 in vbox for trunk/include


Ignore:
Timestamp:
Jul 9, 2009 12:23:15 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
49830
Message:

Main: teach Bstr to convert from a MiniString as well as Utf8Str

File:
1 edited

Legend:

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

    r21409 r21435  
    9191#endif
    9292
    93     Bstr (const Utf8Str &that);
     93    Bstr (const iprt::MiniString &that);
    9494    Bstr (const char *that);
    9595
     
    601601// inlined Bstr members that depend on Utf8Str
    602602
    603 inline Bstr::Bstr (const Utf8Str &that) : bstr (NULL) { raw_copy (bstr, that); }
    604 inline Bstr::Bstr (const char *that) : bstr (NULL) { raw_copy (bstr, that); }
    605 
    606 inline Bstr &Bstr::operator = (const Utf8Str &that)
     603inline Bstr::Bstr(const iprt::MiniString &that)
     604    : bstr(NULL)
     605{
     606    raw_copy(bstr, that.c_str());
     607}
     608
     609inline Bstr::Bstr(const char *that)
     610    : bstr(NULL)
     611{
     612    raw_copy(bstr, that);
     613}
     614
     615inline Bstr &Bstr::operator=(const Utf8Str &that)
    607616{
    608617    setNull();
    609     raw_copy (bstr, that);
     618    raw_copy(bstr, that);
    610619    return *this;
    611620}
    612 inline Bstr &Bstr::operator = (const char *that)
     621inline Bstr &Bstr::operator=(const char *that)
    613622{
    614623    setNull();
    615     raw_copy (bstr, that);
     624    raw_copy(bstr, that);
    616625    return *this;
    617626}
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