radiant: replace StringBuffer with std::string
[xonotic/netradiant.git] / plugins / vfspk3 / vfs.cpp
index 5871f9914afa657a3c36ebff8eab1f0e1e597b05..703a956e15246afa5854a276fb5f692eef52f658 100644 (file)
@@ -129,8 +129,8 @@ static void FixDOSName( char *src ){
 }
 
 const _QERArchiveTable* GetArchiveTable( ArchiveModules& archiveModules, const char* ext ){
-       StringOutputStream tmp( 16 );
-       tmp << LowerCase( ext );
+       std::string tmp = ext;
+       transform(tmp.begin(), tmp.end(), tmp.begin(), ::tolower);
        return archiveModules.findModule( tmp.c_str() );
 }
 
@@ -393,9 +393,9 @@ static void LoadDpkPakWithDeps( const char* pakname ){
 
        if (pakname == NULL) {
                // load DEPS from game pack
-               StringOutputStream baseDirectory( 256 );
-               const char* basegame = GlobalRadiant().getRequiredGameDescriptionKeyValue( "basegame" );
-               baseDirectory << GlobalRadiant().getGameToolsPath() << basegame << '/';
+               std::string baseDirectory( GlobalRadiant().getGameToolsPath() );
+               baseDirectory += GlobalRadiant().getRequiredGameDescriptionKeyValue( "basegame" );
+               baseDirectory += '/';
                arc = AddDpkDir( baseDirectory.c_str() );
                depsFile = arc->openTextFile( "DEPS" );
        } else {