VirtualBox

Changeset 16836 in vbox


Ignore:
Timestamp:
Feb 17, 2009 1:00:23 PM (16 years ago)
Author:
vboxsync
Message:

OVF: replace stringstreams with IPRT funcs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ApplianceImpl.cpp

    r16831 r16836  
    3535#include "VBox/xml.h"
    3636
    37 #include <iostream>
    38 #include <sstream>
    39 
    4037using namespace std;
    4138
     
    218215////////////////////////////////////////////////////////////////////////////////
    219216
    220 template <class T>
    221 inline
    222 com::Utf8Str toString(const T& val)
    223 {
    224     // @todo optimize
    225     std::ostringstream ss;
    226     ss << val;
    227     return Utf8Str(ss.str().c_str());
     217template<class T> inline com::Utf8Str toString(const T &val);
     218
     219// specializations
     220template<> com::Utf8Str toString<uint32_t>(const uint32_t &val)
     221{
     222    return Utf8StrFmt("%RI16", val);
     223}
     224
     225template<> com::Utf8Str toString<uint64_t>(const uint64_t &val)
     226{
     227    return Utf8StrFmt("%RI32", val);
    228228}
    229229
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