]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Replace custom string classes with std::string - gone forever version
authorMattia Basaglia <mattia.basaglia@gmail.com>
Mon, 20 Jul 2015 20:11:48 +0000 (22:11 +0200)
committerMattia Basaglia <mattia.basaglia@gmail.com>
Mon, 20 Jul 2015 20:11:48 +0000 (22:11 +0200)
84 files changed:
contrib/bobtoolz/DPlane.h
contrib/prtview/prtview.cpp
include/preferencesystem.cpp
libs/archivelib.h
libs/container/hashfunc.h
libs/container/hashtable.cpp
libs/eclasslib.h
libs/entitylib.h
libs/fs_filesystem.h
libs/gtkutil/filechooser.cpp
libs/gtkutil/image.cpp
libs/maplib.h
libs/modulesystem/modulesmap.h
libs/shaderlib.h
libs/string/string.cpp [deleted file]
libs/string/string.h
libs/string/stringfwd.cpp [deleted file]
libs/string/stringfwd.h [deleted file]
libs/stringio.h
libs/uniquenames.h
libs/xml/xmlelement.h
libs/xml/xmltextags.cpp
libs/xml/xmltextags.h
plugins/archivepak/archive.cpp
plugins/archivewad/archive.cpp
plugins/archivezip/archive.cpp
plugins/entity/doom3group.cpp
plugins/entity/light.cpp
plugins/entity/modelskinkey.h
plugins/entity/namedentity.h
plugins/entity/namekeys.h
plugins/entity/skincache.cpp
plugins/entity/targetable.cpp
plugins/mapq3/parse.cpp
plugins/mapq3/plugin.cpp
plugins/md3model/model.h
plugins/model/model.cpp
plugins/model/plugin.cpp
plugins/shaders/shaders.cpp
plugins/vfspk3/archive.cpp
plugins/vfspk3/vfs.cpp
radiant/brush.h
radiant/brushmanip.cpp
radiant/brushmanip.h
radiant/build.cpp
radiant/commands.cpp
radiant/dialog.cpp
radiant/dialog.h
radiant/eclass.cpp
radiant/eclass_def.cpp
radiant/eclass_doom3.cpp
radiant/eclass_fgd.cpp
radiant/eclass_xml.cpp
radiant/entityinspector.cpp
radiant/environment.cpp
radiant/filetypes.cpp
radiant/findtexturedialog.cpp
radiant/gtkdlgs.cpp
radiant/gtkdlgs.h
radiant/help.cpp
radiant/main.cpp
radiant/mainframe.cpp
radiant/mainframe.h
radiant/map.cpp
radiant/map.h
radiant/mru.cpp
radiant/patch.h
radiant/patchdialog.cpp
radiant/patchmanip.cpp
radiant/patchmanip.h
radiant/pluginmanager.cpp
radiant/preferencedictionary.h
radiant/preferences.cpp
radiant/preferences.h
radiant/qe3.h
radiant/referencecache.cpp
radiant/renderstate.cpp
radiant/server.cpp
radiant/surfacedialog.cpp
radiant/textures.cpp
radiant/texwindow.cpp
radiant/treemodel.cpp
radiant/undo.cpp
radiant/xywindow.cpp

index 6e840cdb71ba81b77b51065149d220d72eb0eeec..69ce0eb30d07935bee52e5a8050d0e15d6b9e7fe 100644 (file)
@@ -64,7 +64,7 @@ virtual ~DPlane();
 
 bool m_bChkOk;
 _QERFaceData texInfo;
-CopiedString m_shader;
+std::string m_shader;
 vec3_t points[3];           // djbob:do we really need these any more?
 vec3_t normal;
 float _d;
index 36702213c2018bdc46abee5fa56061e667a40391..24070336cdb1c28a3d76a2a1a8fb7d2096d0abb0 100644 (file)
@@ -43,7 +43,7 @@
 #define Q3R_CMD_SHOW_2D "Toggle portals (2D)"
 #define Q3R_CMD_OPTIONS "Configure Portal Viewer"
 
-CopiedString INIfn;
+std::string INIfn;
 
 /////////////////////////////////////////////////////////////////////////////
 // CPrtViewApp construction
index 6152cb14865140d173ff2daf6df1eb9daaf34436..6bc66eef2e7f863f970e4a913c7d182db3d4e8c3 100644 (file)
@@ -65,7 +65,7 @@ virtual void onChanged() = 0;
 };
 
 private:
-CopiedString m_string;
+std::string m_string;
 Observer& m_observer;
 public:
 StringPreference( Observer& observer )
index 78fc7eb561bda6242fba4d7a1a355d77e04bff70..7d2e9a3ddc42fbf32dff4414ee3a9a1d4570c0e8 100644 (file)
@@ -96,7 +96,7 @@ std::size_t read( char* buffer, std::size_t length ){
 /// \brief An ArchiveFile which is stored uncompressed as part of a larger archive file.
 class StoredArchiveFile : public ArchiveFile
 {
-CopiedString m_name;
+std::string m_name;
 FileInputStream m_filestream;
 SubFileInputStream m_substream;
 FileInputStream::size_type m_size;
@@ -129,7 +129,7 @@ InputStream& getInputStream(){
 /// \brief An ArchiveTextFile which is stored uncompressed as part of a larger archive file.
 class StoredArchiveTextFile : public ArchiveTextFile
 {
-CopiedString m_name;
+std::string m_name;
 FileInputStream m_filestream;
 SubFileInputStream m_substream;
 BinaryToTextInputStream<SubFileInputStream> m_textStream;
@@ -159,7 +159,7 @@ TextInputStream& getInputStream(){
 /// \brief An ArchiveFile which is stored as a single file on disk.
 class DirectoryArchiveFile : public ArchiveFile
 {
-CopiedString m_name;
+std::string m_name;
 FileInputStream m_istream;
 FileInputStream::size_type m_size;
 public:
@@ -198,7 +198,7 @@ InputStream& getInputStream(){
 /// \brief An ArchiveTextFile which is stored as a single file on disk.
 class DirectoryArchiveTextFile : public ArchiveTextFile
 {
-CopiedString m_name;
+std::string m_name;
 TextFileInputStream m_inputStream;
 public:
 
index 6d2166971488b65e7601395d47a533c8aefe9d4e..59a34c7d991c6e3e7ad417cde501147c2a6ecf2c 100644 (file)
@@ -314,7 +314,7 @@ struct RawStringHash
 struct HashString
 {
        typedef hash_t hash_type;
-       hash_type operator()( const CopiedString& string ) const {
+       hash_type operator()( const std::string& string ) const {
                return string_hash( string.c_str() );
        }
 };
@@ -322,7 +322,7 @@ struct HashString
 struct HashStringNoCase
 {
        typedef hash_t hash_type;
-       hash_type operator()( const CopiedString& string ) const {
+       hash_type operator()( const std::string& string ) const {
                return string_hash_nocase( string.c_str() );
        }
 };
index edcaff637bdca4b646ea8f21d5e6b65ef35f7d0d..5e49e0e8601832f89f4f19a183bddd73c88fba9e 100644 (file)
@@ -29,7 +29,7 @@ namespace ExampleHashTable
 {
 void testStuff(){
        // HashTable example
-       typedef HashTable<CopiedString, int, HashString> MyHashTable;
+       typedef HashTable<std::string, int, HashString> MyHashTable;
        MyHashTable hashtable;
        hashtable["bleh"] = 5;
        hashtable.insert( "blah", 17 );
index d2730d62beb07e3b732ad14e8648ec4dc02101f6..ac0718b32b4b62238ca4ce852bfe410ed4c84f05 100644 (file)
@@ -38,7 +38,7 @@ typedef Vector3 Colour3;
 
 class ListAttributeType
 {
-typedef std::pair<CopiedString, CopiedString> ListItem;
+typedef std::pair<std::string, std::string> ListItem;
 typedef std::vector<ListItem> ListItems;
 ListItems m_items;
 public:
@@ -72,19 +72,19 @@ void push_back( const char* name, const char* value ){
 class EntityClassAttribute
 {
 public:
-CopiedString m_type;
-CopiedString m_name;
-CopiedString m_value;
-CopiedString m_description;
+std::string m_type;
+std::string m_name;
+std::string m_value;
+std::string m_description;
 EntityClassAttribute(){
 }
 EntityClassAttribute( const char* type, const char* name, const char* value = "", const char* description = "" ) : m_type( type ), m_name( name ), m_value( value ), m_description( description ){
 }
 };
 
-typedef std::pair<CopiedString, EntityClassAttribute> EntityClassAttributePair;
+typedef std::pair<std::string, EntityClassAttribute> EntityClassAttributePair;
 typedef std::list<EntityClassAttributePair> EntityClassAttributes;
-typedef std::list<CopiedString> StringList;
+typedef std::list<std::string> StringList;
 
 inline const char* EntityClassAttributePair_getName( const EntityClassAttributePair& attributePair ){
        if ( !string_empty( attributePair.second.m_name.c_str() ) ) {
@@ -103,7 +103,7 @@ inline const char* EntityClassAttributePair_getDescription( const EntityClassAtt
 class EntityClass
 {
 public:
-CopiedString m_name;
+std::string m_name;
 StringList m_parent;
 bool fixedsize;
 bool unknown;               // wasn't found in source
@@ -115,11 +115,11 @@ Shader* m_state_fill;
 Shader* m_state_wire;
 Shader* m_state_blend;
 
-CopiedString m_comments;
+std::string m_comments;
 char flagnames[MAX_FLAGS][32];
 
-CopiedString m_modelpath;
-CopiedString m_skin;
+std::string m_modelpath;
+std::string m_skin;
 
 void ( *free )( EntityClass* );
 
index 7f1bb0c1c355163e625124aeaaa04ee458b880fe..80162f3090e81fecaffc035189a058fa17c748ce 100644 (file)
@@ -297,9 +297,9 @@ typedef UnsortedSet<KeyObserver> KeyObservers;
 
 std::size_t m_refcount;
 KeyObservers m_observers;
-CopiedString m_string;
+std::string m_string;
 const char* m_empty;
-ObservedUndoableObject<CopiedString> m_undo;
+ObservedUndoableObject<std::string> m_undo;
 static EntityCreator::KeyValueChangedFunc m_entityKeyValueChanged;
 public:
 
@@ -361,12 +361,12 @@ void notify(){
        }
 }
 
-void importState( const CopiedString& string ){
+void importState( const std::string& string ){
        m_string = string;
 
        notify();
 }
-typedef MemberCaller1<KeyValue, const CopiedString&, &KeyValue::importState> UndoImportCaller;
+typedef MemberCaller1<KeyValue, const std::string&, &KeyValue::importState> UndoImportCaller;
 };
 
 /// \brief An unsorted list of key/value pairs.
@@ -614,7 +614,7 @@ public:
 /// \brief The resource is released when the ResourceReference is destroyed.
 class ResourceReference
 {
-       CopiedString m_name;
+       std::string m_name;
        Resource* m_resource;
 public:
        ResourceReference( const char* name )
index d181f702d1296f86e43f06b8c946f1f08164add8..a3c2e0f3d95f0fc9a5021b83a26ba000036c2abb 100644 (file)
@@ -48,7 +48,7 @@ class GenericFileSystem
 {
 class Path
 {
-CopiedString m_path;
+std::string m_path;
 unsigned int m_depth;
 public:
 Path( const char* path )
index d65d310ca567dc3eac3d47da95ccb6b946f37b56..a47019f151024764d175b4dd4311cfea80b98b80 100644 (file)
@@ -59,9 +59,9 @@ struct filetype_copy_t
        filetype_copy_t( const filetype_pair_t& other )
                : m_moduleName( other.m_moduleName ), m_name( other.m_type.name ), m_pattern( other.m_type.pattern ){
        }
-       CopiedString m_moduleName;
-       CopiedString m_name;
-       CopiedString m_pattern;
+       std::string m_moduleName;
+       std::string m_name;
+       std::string m_pattern;
 };
 
 typedef std::list<filetype_copy_t> Types;
@@ -90,8 +90,8 @@ class GTKMasks
 {
 const FileTypeList& m_types;
 public:
-std::vector<CopiedString> m_filters;
-std::vector<CopiedString> m_masks;
+std::vector<std::string> m_filters;
+std::vector<std::string> m_masks;
 
 GTKMasks( const FileTypeList& types ) : m_types( types ){
        m_masks.reserve( m_types.size() );
@@ -113,7 +113,7 @@ GTKMasks( const FileTypeList& types ) : m_types( types ){
 }
 
 filetype_pair_t GetTypeForGTKMask( const char *mask ) const {
-       std::vector<CopiedString>::const_iterator j = m_masks.begin();
+       std::vector<std::string>::const_iterator j = m_masks.begin();
        for ( FileTypeList::const_iterator i = m_types.begin(); i != m_types.end(); ++i, ++j )
        {
                if ( string_equal( ( *j ).c_str(), mask ) ) {
index 4605d3f5f9ad79548bb8315c533c0a6c7ee27e3a..59d219dc27bd160cf641e492f59a7779dfe2b931 100644 (file)
@@ -31,7 +31,7 @@
 
 namespace
 {
-CopiedString g_bitmapsPath;
+std::string g_bitmapsPath;
 }
 
 void BitmapsPath_set( const char* path ){
index 07da39dcf7466e8c402df287ed48479ee46d5720..b1566a77dcffc2fa074be4b17977dbd6b1639ed1 100644 (file)
@@ -36,7 +36,7 @@
 
 class NameableString : public Nameable
 {
-CopiedString m_name;
+std::string m_name;
 public:
 NameableString( const char* name )
        : m_name( name ){
index a48a083b9798702bc89ee5f86c76af9c4347a9c3..f9d657fa9d48c1d0fbe89f0d8dd8a8e3f7e3bf8a 100644 (file)
@@ -30,7 +30,7 @@
 template<typename Type>
 class ModulesMap : public Modules<Type>
 {
-typedef std::map<CopiedString, Module*> modules_t;
+typedef std::map<std::string, Module*> modules_t;
 modules_t m_modules;
 public:
 ~ModulesMap(){
index ee972437befeb934fbfb06c11862af6873d6329b..80afbe2f13e7a0b65ef093a495926a13fad86665 100644 (file)
@@ -45,7 +45,7 @@ inline bool shader_equal_prefix( const char* string, const char* prefix ){
 class shader_less_t
 {
 public:
-bool operator()( const CopiedString& shader, const CopiedString& other ) const {
+bool operator()( const std::string& shader, const std::string& other ) const {
        return shader_less( shader.c_str(), other.c_str() );
 }
 };
diff --git a/libs/string/string.cpp b/libs/string/string.cpp
deleted file mode 100644 (file)
index ccca51c..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-   Copyright (C) 2001-2006, William Joseph.
-   All Rights Reserved.
-
-   This file is part of GtkRadiant.
-
-   GtkRadiant is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   GtkRadiant is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with GtkRadiant; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include "string.h"
-
-/// \note Never called...
-void TestString(){
-       CopiedString bleh( "bleh" );
-       //SmartString blah( "blah" );
-}
index 7ab7e66b0643186c4f028f411e7bc8646a7705ed..835151dd21044c2d78b64bc972b5b2eea96cfc1e 100644 (file)
@@ -288,224 +288,17 @@ const char* getToken(){
 }
 };
 
-#if 0
-/// \brief A non-mutable c-style string.
-///
-/// \param Buffer The string storage implementation. Must be DefaultConstructible, CopyConstructible and Assignable. Must implement:
-/// \li Buffer(const char* string) - constructor which copies a c-style \p string.
-/// \li Buffer(const char* first, const char*) - constructor which copies a c-style string range [\p first, \p last).
-/// \li void swap(Buffer& other) - swaps contents with \p other.
-/// \li const char* c_str() - returns the stored non-mutable c-style string.
-template<typename Buffer>
-class String : public Buffer
-{
-public:
-
-String()
-       : Buffer(){
-}
-String( const char* string )
-       : Buffer( string ){
-}
-String( StringRange range )
-       : Buffer( range ){
-}
-
-String& operator=( const String& other ){
-       String temp( other );
-       temp.swap( *this );
-       return *this;
-}
-String& operator=( const char* string ){
-       String temp( string );
-       temp.swap( *this );
-       return *this;
-}
-String& operator=( StringRange range ){
-       String temp( range );
-       temp.swap( *this );
-       return *this;
-}
-
-void swap( String& other ){
-       Buffer::swap( other );
-}
-
-bool empty() const {
-       return string_empty( Buffer::c_str() );
-}
-};
-
-template<typename Buffer>
-inline bool operator<( const String<Buffer>& self, const String<Buffer>& other ){
-       return string_less( self.c_str(), other.c_str() );
-}
-
-template<typename Buffer>
-inline bool operator>( const String<Buffer>& self, const String<Buffer>& other ){
-       return string_greater( self.c_str(), other.c_str() );
-}
-
-template<typename Buffer>
-inline bool operator==( const String<Buffer>& self, const String<Buffer>& other ){
-       return string_equal( self.c_str(), other.c_str() );
-}
-
-template<typename Buffer>
-inline bool operator!=( const String<Buffer>& self, const String<Buffer>& other ){
-       return !string_equal( self.c_str(), other.c_str() );
-}
-
-template<typename Buffer>
-inline bool operator==( const String<Buffer>& self, const char* other ){
-       return string_equal( self.c_str(), other );
-}
-
-template<typename Buffer>
-inline bool operator!=( const String<Buffer>& self, const char* other ){
-       return !string_equal( self.c_str(), other );
-}
-
-namespace std
-{
-/// \brief Swaps the values of \p self and \p other.
-/// Overloads std::swap.
-template<typename Buffer>
-inline void swap( String<Buffer>& self, String<Buffer>& other ){
-       self.swap( other );
-}
-}
-
-
-/// \brief A non-mutable string buffer which manages memory allocation.
-template<typename Allocator>
-class CopiedBuffer : private Allocator
-{
-char* m_string;
-
-char* copy_range( StringRange range ){
-       return string_clone_range( range, static_cast<Allocator&>( *this ) );
-}
-char* copy( const char* other ){
-       return string_clone( other, static_cast<Allocator&>( *this ) );
-}
-void destroy( char* string ){
-       string_release( string, string_length( string ), static_cast<Allocator&>( *this ) );
-}
-
-protected:
-~CopiedBuffer(){
-       destroy( m_string );
-}
-public:
-CopiedBuffer()
-       : m_string( copy( "" ) ){
-}
-explicit CopiedBuffer( const Allocator& allocator )
-       : Allocator( allocator ), m_string( copy( "" ) ){
-}
-CopiedBuffer( const CopiedBuffer& other )
-       : Allocator( other ), m_string( copy( other.m_string ) ){
-}
-CopiedBuffer( const char* string, const Allocator& allocator = Allocator() )
-       : Allocator( allocator ), m_string( copy( string ) ){
-}
-CopiedBuffer( StringRange range, const Allocator& allocator = Allocator() )
-       : Allocator( allocator ), m_string( copy_range( range ) ){
-}
-const char* c_str() const {
-       return m_string;
-}
-void swap( CopiedBuffer& other ){
-       string_swap( m_string, other.m_string );
-}
-};
-
-/// \brief A non-mutable string which uses copy-by-value for assignment.
-typedef String< CopiedBuffer< DefaultAllocator<char> > > CopiedString;
-
-/// \brief A non-mutable string buffer which uses reference-counting to avoid unnecessary allocations.
-template<typename Allocator>
-class SmartBuffer : private Allocator
-{
-char* m_buffer;
-
-char* copy_range( StringRange range ){
-       char* buffer = Allocator::allocate( sizeof( std::size_t ) + ( range.last - range.first ) + 1 );
-       strncpy( buffer + sizeof( std::size_t ), range.first, range.last - range.first );
-       buffer[sizeof( std::size_t ) + ( range.last - range.first )] = '\0';
-       *reinterpret_cast<std::size_t*>( buffer ) = 0;
-       return buffer;
-}
-char* copy( const char* string ){
-       char* buffer = Allocator::allocate( sizeof( std::size_t ) + string_length( string ) + 1 );
-       strcpy( buffer + sizeof( std::size_t ), string );
-       *reinterpret_cast<std::size_t*>( buffer ) = 0;
-       return buffer;
-}
-void destroy( char* buffer ){
-       Allocator::deallocate( buffer, sizeof( std::size_t ) + string_length( c_str() ) + 1 );
-}
-
-void incref( char* buffer ){
-       ++( *reinterpret_cast<std::size_t*>( buffer ) );
-}
-void decref( char* buffer ){
-       if ( --( *reinterpret_cast<std::size_t*>( buffer ) ) == 0 ) {
-               destroy( buffer );
-       }
-}
-
-protected:
-~SmartBuffer(){
-       decref( m_buffer );
-}
-public:
-SmartBuffer()
-       : m_buffer( copy( "" ) ){
-       incref( m_buffer );
-}
-explicit SmartBuffer( const Allocator& allocator )
-       : Allocator( allocator ), m_buffer( copy( "" ) ){
-       incref( m_buffer );
-}
-SmartBuffer( const SmartBuffer& other )
-       : Allocator( other ), m_buffer( other.m_buffer ){
-       incref( m_buffer );
-}
-SmartBuffer( const char* string, const Allocator& allocator = Allocator() )
-       : Allocator( allocator ), m_buffer( copy( string ) ){
-       incref( m_buffer );
-}
-SmartBuffer( StringRange range, const Allocator& allocator = Allocator() )
-       : Allocator( allocator ), m_buffer( copy_range( range ) ){
-       incref( m_buffer );
-}
-const char* c_str() const {
-       return m_buffer + sizeof( std::size_t );
-}
-void swap( SmartBuffer& other ){
-       string_swap( m_buffer, other.m_buffer );
-}
-};
-
-/// \brief A non-mutable string which uses copy-by-reference for assignment of SmartString.
-typedef String< SmartBuffer< DefaultAllocator<char> > > SmartString;
-#endif
-
-typedef std::string CopiedString;
-
 class StringEqualNoCase
 {
 public:
-bool operator()( const CopiedString& key, const CopiedString& other ) const {
+bool operator()( const std::string& key, const std::string& other ) const {
        return string_equal_nocase( key.c_str(), other.c_str() );
 }
 };
 
 struct StringLessNoCase
 {
-       bool operator()( const CopiedString& x, const CopiedString& y ) const {
+       bool operator()( const std::string& x, const std::string& y ) const {
                return string_less_nocase( x.c_str(), y.c_str() );
        }
 };
diff --git a/libs/string/stringfwd.cpp b/libs/string/stringfwd.cpp
deleted file mode 100644 (file)
index add6eee..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-   Copyright (C) 2001-2006, William Joseph.
-   All Rights Reserved.
-
-   This file is part of GtkRadiant.
-
-   GtkRadiant is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   GtkRadiant is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with GtkRadiant; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include "stringfwd.h"
diff --git a/libs/string/stringfwd.h b/libs/string/stringfwd.h
deleted file mode 100644 (file)
index 1946a09..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-   Copyright (C) 2001-2006, William Joseph.
-   All Rights Reserved.
-
-   This file is part of GtkRadiant.
-
-   GtkRadiant is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   GtkRadiant is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with GtkRadiant; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#if !defined( INCLUDED_STRING_STRINGFWD_H )
-#define INCLUDED_STRING_STRINGFWD_H
-
-#include <string>
-
-// forward-declaration of CopiedString
-
-template<typename Type>
-class DefaultAllocator;
-/*template<typename Allocator>
-class CopiedBuffer;
-template<typename Buffer>
-class String;
-typedef String< CopiedBuffer< DefaultAllocator<char> > > CopiedString;*/
-typedef std::string CopiedString;
-
-#endif
index 8af056e6fc514726a818d77c8065cf5f7d227890..174f15fab7b6c6f06cd28b7cbc68cf04584dd94b 100644 (file)
@@ -289,14 +289,14 @@ inline TextOutputStreamType& ostream_write( TextOutputStreamType& outputStream,
 
 
 
-inline void CopiedString_importString( CopiedString& self, const char* string ){
+inline void CopiedString_importString( std::string& self, const char* string ){
        self = string;
 }
-typedef ReferenceCaller1<CopiedString, const char*, CopiedString_importString> CopiedStringImportStringCaller;
-inline void CopiedString_exportString( const CopiedString& self, const StringImportCallback& importer ){
+typedef ReferenceCaller1<std::string, const char*, CopiedString_importString> CopiedStringImportStringCaller;
+inline void CopiedString_exportString( const std::string& self, const StringImportCallback& importer ){
        importer( self.c_str() );
 }
-typedef ConstReferenceCaller1<CopiedString, const StringImportCallback&, CopiedString_exportString> CopiedStringExportStringCaller;
+typedef ConstReferenceCaller1<std::string, const StringImportCallback&, CopiedString_exportString> CopiedStringExportStringCaller;
 
 inline void Bool_importString( bool& self, const char* string ){
        self = string_equal( string, "true" );
index 8ff67f15b55150829fa103413b03593d4e3f1992..8871a43938ca67b96b8e990904592719791484e1 100644 (file)
@@ -97,7 +97,7 @@ bool operator!=( const Postfix& other ) const {
 
 #endif
 
-typedef std::pair<CopiedString, Postfix> name_t;
+typedef std::pair<std::string, Postfix> name_t;
 
 inline void name_write( char* buffer, name_t name ){
        strcpy( buffer, name.first.c_str() );
@@ -114,7 +114,7 @@ inline name_t name_read( const char* name ){
                end = p;
        }
 
-       return name_t( CopiedString( StringRange( name, end ) ), Postfix( end ) );
+       return name_t( std::string( StringRange( name, end ) ), Postfix( end ) );
 }
 
 
@@ -180,7 +180,7 @@ bool empty() const {
 
 class UniqueNames
 {
-typedef std::map<CopiedString, PostFixes> names_t;
+typedef std::map<std::string, PostFixes> names_t;
 names_t m_names;
 public:
 name_t make_unique( const name_t& name ) const {
index 5bedf5545336edc388c514183b38f73c56ee8aff..58f60aa70ec3305a837818f3a901d5d7b75e8388 100644 (file)
@@ -65,7 +65,7 @@ attrs_t m_attrs;
 ///\brief All string pointers passed to an instance of this class are copied.
 class DynamicElement : public XMLElement
 {
-typedef std::map<CopiedString, CopiedString> attrs_t;
+typedef std::map<std::string, std::string> attrs_t;
 public:
 DynamicElement( const char* name )
        : m_name( name ){
@@ -92,7 +92,7 @@ void forEachAttribute( XMLAttrVisitor& visitor ) const {
        }
 }
 private:
-CopiedString m_name;
+std::string m_name;
 attrs_t m_attrs;
 };
 
index 7baf0e5e084e4e709f2ea47bb0cf46e97da57c7c..b9634ad4c68257836db0cb7bdd467eb860981651 100644 (file)
@@ -361,7 +361,7 @@ bool XmlTagBuilder::AddShaderTag( const char* shader, const char* content, NodeT
 }
 
 //int XmlTagBuilder::RenameShaderTag(const char* oldtag, const char* newtag)
-int XmlTagBuilder::RenameShaderTag( const char* oldtag, CopiedString newtag ){
+int XmlTagBuilder::RenameShaderTag( const char* oldtag, std::string newtag ){
        /* Replaces tag node contents
 
           char* oldtag - the <tag></tag> node content that sould be changed
@@ -457,9 +457,9 @@ bool XmlTagBuilder::DeleteTag( const char* tag ){
        strcat( expression, tag );
        strcat( expression, "']" );
 
-       std::set<CopiedString> dellist;
+       std::set<std::string> dellist;
        TagSearch( expression, dellist );
-       std::set<CopiedString>::iterator iter;
+       std::set<std::string>::iterator iter;
 
        for ( iter = dellist.begin(); iter != dellist.end(); iter++ )
        {
@@ -470,7 +470,7 @@ bool XmlTagBuilder::DeleteTag( const char* tag ){
        return true;
 }
 
-void XmlTagBuilder::GetShaderTags( const char* shader, std::vector<CopiedString>& tags ){
+void XmlTagBuilder::GetShaderTags( const char* shader, std::vector<std::string>& tags ){
        /* Gets the tags from a shader
 
           char* shader - the name of the shader
@@ -500,13 +500,13 @@ void XmlTagBuilder::GetShaderTags( const char* shader, std::vector<CopiedString>
        if ( !xmlXPathNodeSetIsEmpty( nodePtr ) ) {
                for ( int i = 0; i < nodePtr->nodeNr; i++ )
                {
-                       tags.push_back( (CopiedString)(char*)xmlNodeGetContent( nodePtr->nodeTab[i] ) );
+                       tags.push_back( (std::string)(char*)xmlNodeGetContent( nodePtr->nodeTab[i] ) );
                }
        }
        xmlXPathFreeObject( xpathPtr );
 }
 
-void XmlTagBuilder::GetUntagged( std::set<CopiedString>& shaders ){
+void XmlTagBuilder::GetUntagged( std::set<std::string>& shaders ){
        /* Gets all textures and shaders listed in the xml file that don't have any tag
 
           returns a set containing the shaders (with path)
@@ -536,7 +536,7 @@ void XmlTagBuilder::GetUntagged( std::set<CopiedString>& shaders ){
        xmlXPathFreeObject( xpathPtr );
 }
 
-void XmlTagBuilder::GetAllTags( std::set<CopiedString>& tags ){
+void XmlTagBuilder::GetAllTags( std::set<std::string>& tags ){
        /* Gets a list of all tags that are used (assigned to any shader)
 
           returns a set containing all used tags
@@ -556,14 +556,14 @@ void XmlTagBuilder::GetAllTags( std::set<CopiedString>& tags ){
        if ( !xmlXPathNodeSetIsEmpty( nodePtr ) ) {
                for ( int i = 0; i < nodePtr->nodeNr; i++ )
                {
-                       tags.insert( (CopiedString)(char*)xmlNodeGetContent( nodePtr->nodeTab[i] ) );
+                       tags.insert( (std::string)(char*)xmlNodeGetContent( nodePtr->nodeTab[i] ) );
                }
        }
 
        xmlXPathFreeObject( xpathPtr );
 }
 
-void XmlTagBuilder::TagSearch( const char* expression, std::set<CopiedString>& paths ){
+void XmlTagBuilder::TagSearch( const char* expression, std::set<std::string>& paths ){
        /* Searches shaders by tags
 
           char* expression - the XPath expression to search
@@ -587,7 +587,7 @@ void XmlTagBuilder::TagSearch( const char* expression, std::set<CopiedString>& p
                {
                        ptr = nodePtr->nodeTab[i];
                        xmlattrib = xmlGetProp( ptr, (const xmlChar*)"path" );
-                       paths.insert( (CopiedString)(char*)xmlattrib );
+                       paths.insert( (std::string)(char*)xmlattrib );
                }
        }
        xmlXPathFreeObject( xpathPtr );
index dbad5f5629199ad8a98916718338e05585670498..8599fca370b596f8e0545f36b2fc21911ae8f39e 100644 (file)
@@ -52,7 +52,7 @@ enum TextureType
 class XmlTagBuilder
 {
 private:
-CopiedString m_savefilename;
+std::string m_savefilename;
 xmlDocPtr doc;
 xmlXPathContextPtr context;
 xmlNodeSetPtr nodePtr;
@@ -93,12 +93,12 @@ bool CheckShaderTag( const char* shader );
 bool CheckShaderTag( const char* shader, const char* content );
 bool AddShaderTag( const char* shader, const char* content, NodeTagType nodeTagType );
 bool DeleteTag( const char* tag );
-int RenameShaderTag( const char* oldtag, CopiedString newtag );
+int RenameShaderTag( const char* oldtag, std::string newtag );
 bool DeleteShaderTag( const char* shader, const char* tag );
-void GetShaderTags( const char* shader, std::vector<CopiedString>& tags );
-void GetUntagged( std::set<CopiedString>& shaders );
-void GetAllTags( std::set<CopiedString>& tags );
-void TagSearch( const char* expression, std::set<CopiedString>& paths );
+void GetShaderTags( const char* shader, std::vector<std::string>& tags );
+void GetUntagged( std::set<std::string>& shaders );
+void GetAllTags( std::set<std::string>& tags );
+void TagSearch( const char* expression, std::set<std::string>& paths );
 };
 
 #endif
index 785c2dda2aeda4b8ecc43c88326f72b89091b897..46215ef6d19cf1095bcd5680d264eec7d87754b9 100644 (file)
@@ -64,7 +64,7 @@ unsigned int m_stream_size;
 typedef GenericFileSystem<PakRecord> PakFileSystem;
 PakFileSystem m_filesystem;
 FileInputStream m_pakfile;
-CopiedString m_name;
+std::string m_name;
 
 public:
 
index 793cb0e7091942d8575b4b010f8906d113df9400..b9490bf965dac29908e185842367dcb0fc69b496 100644 (file)
@@ -58,9 +58,9 @@ enum EWadVersion
        eWAD3,
 };
 
-typedef std::map<CopiedString, wad_record_t, StringLessNoCase> files_t;
+typedef std::map<std::string, wad_record_t, StringLessNoCase> files_t;
 files_t m_files;
-CopiedString m_name;
+std::string m_name;
 FileInputStream m_wadfile;
 
 EWadVersion wad_version( const char* identification ){
index a8616e626daafdb51a6e76c932f5a90d4ffc9bdc..1136a5c0591febd24db637d76cf2f80d0b6b8083 100644 (file)
@@ -34,7 +34,7 @@
 
 class DeflatedArchiveFile : public ArchiveFile
 {
-CopiedString m_name;
+std::string m_name;
 FileInputStream m_istream;
 SubFileInputStream m_substream;
 DeflatedInputStream m_zipstream;
@@ -63,7 +63,7 @@ InputStream& getInputStream(){
 
 class DeflatedArchiveTextFile : public ArchiveTextFile
 {
-CopiedString m_name;
+std::string m_name;
 FileInputStream m_istream;
 SubFileInputStream m_substream;
 DeflatedInputStream m_zipstream;
@@ -112,7 +112,7 @@ ECompressionMode m_mode;
 
 typedef GenericFileSystem<ZipRecord> ZipFileSystem;
 ZipFileSystem m_filesystem;
-CopiedString m_name;
+std::string m_name;
 FileInputStream m_istream;
 
 bool read_record(){
index b53017c55d59b05c734714305da1d11b113ab9a1..dc4ace447b89f3e9184fbc28d377ef01cff7aad6 100644 (file)
@@ -106,8 +106,8 @@ mutable AABB m_curveBounds;
 Callback m_transformChanged;
 Callback m_evaluateTransform;
 
-CopiedString m_name;
-CopiedString m_modelKey;
+std::string m_name;
+std::string m_modelKey;
 bool m_isModel;
 
 scene::Traversable* m_traversable;
index 0b559893384db1d10d47d219ebd1763008a9cf9d..109121824eefc791b4adb2bb17aafa90b0e9422b 100644 (file)
@@ -660,7 +660,7 @@ inline void default_extents( Vector3& extents ){
 
 class ShaderRef
 {
-CopiedString m_name;
+std::string m_name;
 Shader* m_shader;
 void capture(){
        m_shader = GlobalShaderCache().capture( m_name.c_str() );
index 34d9111201a79cc2c1f5aa554d50cf0985cf87d2..fdac8831174b660ece511d0474097d85a281ad68 100644 (file)
@@ -30,7 +30,7 @@
 #include "entitylib.h"
 #include "traverselib.h"
 
-inline void parseTextureName( CopiedString& name, const char* token ){
+inline void parseTextureName( std::string& name, const char* token ){
        StringOutputStream cleaned( 256 );
        cleaned << PathCleaned( token );
        name = StringRange( cleaned.c_str(), path_get_filename_base_end( cleaned.c_str() ) ); // remove extension
@@ -38,7 +38,7 @@ inline void parseTextureName( CopiedString& name, const char* token ){
 
 class ModelSkinKey : public ModuleObserver
 {
-CopiedString m_name;
+std::string m_name;
 ModelSkin* m_skin;
 Callback m_skinChangedCallback;
 
index 29170d9e795bd112c78e4bc6d461191f6f90c8b5..bddded2284992d1dabb3a3e581daea8d3cb67779 100644 (file)
@@ -52,7 +52,7 @@ class NamedEntity : public Nameable
 {
 EntityKeyValues& m_entity;
 NameCallbackSet m_changed;
-CopiedString m_name;
+std::string m_name;
 public:
 NamedEntity( EntityKeyValues& entity ) : m_entity( entity ){
 }
index 0e2d88b3b48bdedf96a69f101ac2d81656a76432..a984a089256af4c3868f6fb1184db572c7da56f8 100644 (file)
@@ -58,7 +58,7 @@ KeyIsNameFunc m_keyIsName;
 NameKeys( const NameKeys& other );
 NameKeys& operator=( const NameKeys& other );
 
-typedef std::map<CopiedString, EntityKeyValue*> KeyValues;
+typedef std::map<std::string, EntityKeyValue*> KeyValues;
 KeyValues m_keyValues;
 
 void insertName( const char* key, EntityKeyValue& value ){
index fce3c1a14f4547ea29df520d0e278ae2d54ae34b..c65355d94e4655d7f87922ad9a072ff597092a0f 100644 (file)
@@ -37,7 +37,7 @@
 #include "modulesystem/singletonmodule.h"
 #include "stringio.h"
 
-void parseShaderName( CopiedString& name, const char* token ){
+void parseShaderName( std::string& name, const char* token ){
        StringOutputStream cleaned( 256 );
        cleaned << PathCleaned( token );
        name = cleaned.c_str();
@@ -45,7 +45,7 @@ void parseShaderName( CopiedString& name, const char* token ){
 
 class Doom3ModelSkin
 {
-typedef std::map<CopiedString, CopiedString> Remaps;
+typedef std::map<std::string, std::string> Remaps;
 Remaps m_remaps;
 public:
 bool parseTokens( Tokeniser& tokeniser ){
@@ -67,7 +67,7 @@ bool parseTokens( Tokeniser& tokeniser ){
                }
                else
                {
-                       CopiedString from, to;
+                       std::string from, to;
                        parseShaderName( from, token );
 
                        tokeniser.nextLine(); // hack to handle badly formed skins
@@ -99,7 +99,7 @@ void forEachRemap( const SkinRemapCallback& callback ) const {
 class GlobalSkins
 {
 public:
-typedef std::map<CopiedString, Doom3ModelSkin> SkinMap;
+typedef std::map<std::string, Doom3ModelSkin> SkinMap;
 SkinMap m_skins;
 Doom3ModelSkin g_nullSkin;
 
@@ -130,7 +130,7 @@ bool parseTokens( Tokeniser& tokeniser ){
                        Tokeniser_unexpectedError( tokeniser, token, "#string" );
                        return false;
                }
-               CopiedString name;
+               std::string name;
                parseShaderName( name, other );
                Doom3ModelSkin& skin = m_skins[name];
                RETURN_FALSE_IF_FAIL( skin.parseTokens( tokeniser ) );
@@ -228,7 +228,7 @@ public:
 explicit CreateDoom3ModelSkin( Doom3ModelSkinCache& cache )
        : m_cache( cache ){
 }
-Doom3ModelSkinCacheElement* construct( const CopiedString& name ){
+Doom3ModelSkinCacheElement* construct( const std::string& name ){
        Doom3ModelSkinCacheElement* skin = new Doom3ModelSkinCacheElement;
        if ( m_cache.realised() ) {
                skin->realise( name.c_str() );
@@ -243,7 +243,7 @@ void destroy( Doom3ModelSkinCacheElement* skin ){
 }
 };
 
-typedef HashedCache<CopiedString, Doom3ModelSkinCacheElement, HashString, std::equal_to<CopiedString>, CreateDoom3ModelSkin> Cache;
+typedef HashedCache<std::string, Doom3ModelSkinCacheElement, HashString, std::equal_to<std::string>, CreateDoom3ModelSkin> Cache;
 Cache m_cache;
 bool m_realised;
 
index e041ee99d53b142a7e06dfd9718fcc146efe0281..b334310d06904c50d550309a5f25f03dff5b2940 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "targetable.h"
 
-typedef std::map<CopiedString, targetables_t> targetnames_t;
+typedef std::map<std::string, targetables_t> targetnames_t;
 
 const char* g_targetable_nameKey = "targetname";
 
index 03b1acae0558c53136fb60f2dc1aab973e270aea..7d3ef3cc46ea9f740b3d1b96d1aada1d9161d24d 100644 (file)
@@ -38,7 +38,7 @@ inline MapImporter* Node_getMapImporter( scene::Node& node ){
 }
 
 
-typedef std::list< std::pair<CopiedString, CopiedString> > KeyValues;
+typedef std::list< std::pair<std::string, std::string> > KeyValues;
 
 NodeSmartReference g_nullNode( NewNullNode() );
 
@@ -99,7 +99,7 @@ NodeSmartReference Entity_parseTokens( Tokeniser& tokeniser, EntityCreator& enti
                }
                else // epair
                {
-                       CopiedString key( token );
+                       std::string key( token );
                        token = tokeniser.getToken();
                        if ( token == 0 ) {
                                Tokeniser_unexpectedError( tokeniser, token, "#epair-value" );
index e21cf22d94b32562d1ad83179313c7b637451686..87c08507fbfef2f29e2e3669f44654eec8690fc5 100644 (file)
@@ -524,7 +524,7 @@ void VMF_parseBlock( Tokeniser& tokeniser, const VMFBlock& block ){
                        tokeniser.ungetToken();
                        break;
                }
-               CopiedString tmp( key );
+               std::string tmp( key );
                tokeniser.nextLine();
                const char* value = tokeniser.getToken();
                tokeniser.nextLine();
index ee76006494978a9b94b6d24376619ba0820fe527..8be39098233d6f128fc6aab2f6a37ade27bde7e4 100644 (file)
@@ -65,7 +65,7 @@ inline VertexPointer vertexpointer_arbitrarymeshvertex( const ArbitraryMeshVerte
        return VertexPointer( VertexPointer::pointer( &array->vertex ), sizeof( ArbitraryMeshVertex ) );
 }
 
-inline void parseTextureName( CopiedString& name, const char* token ){
+inline void parseTextureName( std::string& name, const char* token ){
        StringOutputStream cleaned( 256 );
        cleaned << PathCleaned( token );
        name = StringRange( cleaned.c_str(), path_get_filename_base_end( cleaned.c_str() ) ); // remove extension
@@ -81,7 +81,7 @@ typedef IndexBuffer indices_t;
 private:
 
 AABB m_aabb_local;
-CopiedString m_shader;
+std::string m_shader;
 Shader* m_state;
 
 vertices_t m_vertices;
@@ -324,7 +324,7 @@ SurfaceLightLists m_surfaceLightLists;
 class Remap
 {
 public:
-CopiedString first;
+std::string first;
 Shader* second;
 Remap() : second( 0 ){
 }
index defa472aa0fd56503aea26bb1216fab8044062be..ee5f674b60c221549fb5ef0d9288f6891bd38c54 100644 (file)
@@ -69,7 +69,7 @@ class PicoSurface :
        public OpenGLRenderable
 {
 AABB m_aabb_local;
-CopiedString m_shader;
+std::string m_shader;
 Shader* m_state;
 
 Array<ArbitraryMeshVertex> m_vertices;
@@ -310,7 +310,7 @@ void constructNull(){
 };
 
 
-typedef std::pair<CopiedString, int> PicoModelKey;
+typedef std::pair<std::string, int> PicoModelKey;
 
 
 class PicoModel :
@@ -446,7 +446,7 @@ SurfaceLightLists m_surfaceLightLists;
 class Remap
 {
 public:
-CopiedString first;
+std::string first;
 Shader* second;
 Remap() : second( 0 ){
 }
@@ -808,18 +808,18 @@ void parse_namestr( const char *name ){
                if ( !hasName && ( *ptr == ':' || *ptr == '\0' ) ) {
                        // model name
                        hasName = true;
-                       m_name = CopiedString( s, ptr );
+                       m_name = std::string( s, ptr );
                        s = ptr + 1;
                }
                else if ( *ptr == '?' || *ptr == '\0' ) {
                        // model frame
                        hasFrame = true;
-                       m_frame = atoi( CopiedString( s, ptr ).c_str() );
+                       m_frame = atoi( std::string( s, ptr ).c_str() );
                        s = ptr + 1;
                }
                else if ( *ptr == '&' || *ptr == '\0' ) {
                        // a remap
-                       add_remap( CopiedString( s, ptr ).c_str() );
+                       add_remap( std::string( s, ptr ).c_str() );
                        s = ptr + 1;
                }
 
@@ -857,13 +857,13 @@ inline const char* shader_for_remap( const char* remap ){
        return "";
 }
 
-CopiedString m_name;
+std::string m_name;
 int m_frame;
 PicoModel* m_model;
 
 typedef std::vector<remap_t*> remaps_t;
 remaps_t m_remaps;
-typedef std::vector<CopiedString> shaders_t;
+typedef std::vector<std::string> shaders_t;
 shaders_t m_shaders;
 typedef std::vector<Shader*> states_t;
 states_t m_states;
index 61e77628530ff65e8118ff2d1836b868d2d64914..88a234a9c8498fb2e8860b2cd5bc38e51cb00e59 100644 (file)
@@ -133,7 +133,7 @@ ModelLoader* getTable(){
 
 class PicoModelAPIConstructor
 {
-CopiedString m_extension;
+std::string m_extension;
 const picoModule_t* m_module;
 public:
 PicoModelAPIConstructor( const char* extension, const picoModule_t* module ) :
index a431ef4fbd109c0664f2d189d12353fc28045b9d..39310e8af2942dba1977aec3c4c359d1b5e4eaab 100644 (file)
@@ -223,7 +223,7 @@ typedef Static<StringPool, ShaderPoolContext> ShaderPool;
 typedef PooledString<ShaderPool> ShaderString;
 typedef ShaderString ShaderVariable;
 typedef ShaderString ShaderValue;
-typedef CopiedString TextureExpression;
+typedef std::string TextureExpression;
 
 // clean a texture name to the qtexture_t name format we use internally
 // NOTE: case sensitivity: the engine is case sensitive. we store the shader name with case information and save with case
@@ -234,7 +234,7 @@ template<typename StringType>
 void parseTextureName( StringType& name, const char* token ){
        StringOutputStream cleaned( 256 );
        cleaned << PathCleaned( token );
-       name = CopiedString( StringRange( cleaned.c_str(), path_get_filename_base_end( cleaned.c_str() ) ) ).c_str(); // remove extension
+       name = std::string( StringRange( cleaned.c_str(), path_get_filename_base_end( cleaned.c_str() ) ) ).c_str(); // remove extension
 }
 
 bool Tokeniser_parseTextureName( Tokeniser& tokeniser, TextureExpression& name ){
@@ -247,7 +247,7 @@ bool Tokeniser_parseTextureName( Tokeniser& tokeniser, TextureExpression& name )
        return true;
 }
 
-bool Tokeniser_parseShaderName( Tokeniser& tokeniser, CopiedString& name ){
+bool Tokeniser_parseShaderName( Tokeniser& tokeniser, std::string& name ){
        const char* token = tokeniser.getToken();
        if ( token == 0 ) {
                Tokeniser_unexpectedError( tokeniser, token, "#shader-name" );
@@ -277,7 +277,7 @@ typedef std::pair<ShaderVariable, ShaderVariable> BlendFuncExpression;
 class ShaderTemplate
 {
 std::size_t m_refcount;
-CopiedString m_Name;
+std::string m_Name;
 public:
 
 ShaderParameters m_params;
@@ -676,7 +676,7 @@ bool ShaderTemplate::parseDoom3( Tokeniser& tokeniser ){
 }
 
 typedef SmartPointer<ShaderTemplate> ShaderTemplatePointer;
-typedef std::map<CopiedString, ShaderTemplatePointer> ShaderTemplateMap;
+typedef std::map<std::string, ShaderTemplatePointer> ShaderTemplateMap;
 
 ShaderTemplateMap g_shaders;
 ShaderTemplateMap g_shaderTemplates;
@@ -700,12 +700,12 @@ ShaderArguments args;
 const char* filename;
 };
 
-typedef std::map<CopiedString, ShaderDefinition> ShaderDefinitionMap;
+typedef std::map<std::string, ShaderDefinition> ShaderDefinitionMap;
 
 ShaderDefinitionMap g_shaderDefinitions;
 
 bool parseTemplateInstance( Tokeniser& tokeniser, const char* filename ){
-       CopiedString name;
+       std::string name;
        RETURN_FALSE_IF_FAIL( Tokeniser_parseShaderName( tokeniser, name ) );
        const char* templateName = tokeniser.getToken();
        ShaderTemplate* shaderTemplate = findTemplate( templateName );
@@ -838,7 +838,7 @@ const ShaderTemplate& m_template;
 const ShaderArguments& m_args;
 const char* m_filename;
 // name is shader-name, otherwise texture-name (if not a real shader)
-CopiedString m_Name;
+std::string m_Name;
 
 qtexture_t* m_pTexture;
 qtexture_t* m_notfound;
@@ -1102,7 +1102,7 @@ qtexture_t* lightFalloffImage() const {
 bool CShader::m_lightingEnabled = false;
 
 typedef SmartPointer<CShader> ShaderPointer;
-typedef std::map<CopiedString, ShaderPointer, shader_less_t> shaders_t;
+typedef std::map<std::string, ShaderPointer, shader_less_t> shaders_t;
 
 shaders_t g_ActiveShaders;
 
@@ -1301,7 +1301,7 @@ Layer() : m_type( LAYER_NONE ), m_blendFunc( BLEND_ONE, BLEND_ZERO ), m_clampToB
 }
 };
 
-std::list<CopiedString> g_shaderFilenames;
+std::list<std::string> g_shaderFilenames;
 
 void ParseShaderFile( Tokeniser& tokeniser, const char* filename ){
        g_shaderFilenames.push_back( filename );
@@ -1355,7 +1355,7 @@ void ParseShaderFile( Tokeniser& tokeniser, const char* filename ){
                                        tokeniser.ungetToken();
                                }
                                // first token should be the path + name.. (from base)
-                               CopiedString name;
+                               std::string name;
                                if ( !Tokeniser_parseShaderName( tokeniser, name ) ) {
                                }
                                ShaderTemplatePointer shaderTemplate( new ShaderTemplate() );
index a77b07286a96e91ae8bc54ad3c929c0002c3092a..ea0119f6ee018c6fc745e806ddd226b370e95291 100644 (file)
@@ -42,7 +42,7 @@
 
 class DirectoryArchive : public Archive
 {
-CopiedString m_root;
+std::string m_root;
 public:
 DirectoryArchive( const char* root ) : m_root( root ){
 }
index 4ccc8b59d4e7f30b280a08ac978641fa48ff184f..7e98a41594f2eeffc162c0284f12541ac601254b 100644 (file)
@@ -78,7 +78,7 @@ Archive* OpenArchive( const char* name );
 
 struct archive_entry_t
 {
-       CopiedString name;
+       std::string name;
        Archive* archive;
        bool is_pakfile;
 };
@@ -269,12 +269,12 @@ static int string_compare_nocase_upper( const char* a, const char* b ){
 class PakLess
 {
 public:
-bool operator()( const CopiedString& self, const CopiedString& other ) const {
+bool operator()( const std::string& self, const std::string& other ) const {
        return string_compare_nocase_upper( self.c_str(), other.c_str() ) > 0;
 }
 };
 
-typedef std::set<CopiedString, PakLess> Archives;
+typedef std::set<std::string, PakLess> Archives;
 
 // =============================================================================
 // Global functions
index 0fb6ffe225c2b0d3dbe45d0a8b3d5fb08a07079f..46c820bdd4d84d88b7db384e37c73d783266d2e5 100644 (file)
@@ -366,7 +366,7 @@ public:
 class SavedState
 {
 public:
-CopiedString m_shader;
+std::string m_shader;
 ContentsFlagsValue m_flags;
 
 SavedState( const FaceShader& faceShader ){
@@ -380,7 +380,7 @@ void exportState( FaceShader& faceShader ) const {
 }
 };
 
-CopiedString m_shader;
+std::string m_shader;
 Shader* m_state;
 ContentsFlagsValue m_flags;
 FaceShaderObserverPair m_observers;
index c49464bed1e438537e6a29dcc7bd89b20b7f8bd3..de5dca552ef64b11fae7dfbf51850fb271307864 100644 (file)
@@ -809,10 +809,10 @@ void Scene_BrushGetFlags_Component_Selected( scene::Graph& graph, ContentsFlagsV
 
 class FaceGetShader
 {
-CopiedString& m_shader;
+std::string& m_shader;
 mutable bool m_done;
 public:
-FaceGetShader( CopiedString& shader )
+FaceGetShader( std::string& shader )
        : m_shader( shader ), m_done( false ){
 }
 void operator()( Face& face ) const {
@@ -823,7 +823,7 @@ void operator()( Face& face ) const {
 }
 };
 
-void Scene_BrushGetShader_Selected( scene::Graph& graph, CopiedString& shader ){
+void Scene_BrushGetShader_Selected( scene::Graph& graph, std::string& shader ){
 #if 1
        if ( GlobalSelectionSystem().countSelected() != 0 ) {
                BrushInstance* brush = Instance_getBrush( GlobalSelectionSystem().ultimateSelected() );
@@ -836,7 +836,7 @@ void Scene_BrushGetShader_Selected( scene::Graph& graph, CopiedString& shader ){
 #endif
 }
 
-void Scene_BrushGetShader_Component_Selected( scene::Graph& graph, CopiedString& shader ){
+void Scene_BrushGetShader_Component_Selected( scene::Graph& graph, std::string& shader ){
 #if 1
        if ( !g_SelectedFaceInstances.empty() ) {
                FaceInstance& faceInstance = g_SelectedFaceInstances.last();
index 06f672710fd1f193b35497d2fb311f40f034e4ac..8a32865f27a05b4ab91441c9d73ee7704b33409d 100644 (file)
@@ -23,7 +23,7 @@
 #define INCLUDED_BRUSHWRAPPER_H
 
 #include <cstddef>
-#include "string/stringfwd.h"
+#include <string>
 #include "generic/callbackfwd.h"
 
 enum EBrushPrefab
@@ -61,8 +61,8 @@ void Scene_BrushRotateTexdef_Selected( scene::Graph& graph, float angle );
 void Scene_BrushRotateTexdef_Component_Selected( scene::Graph& graph, float angle );
 void Scene_BrushSetShader_Selected( scene::Graph& graph, const char* name );
 void Scene_BrushSetShader_Component_Selected( scene::Graph& graph, const char* name );
-void Scene_BrushGetShader_Selected( scene::Graph& graph, CopiedString& shader );
-void Scene_BrushGetShader_Component_Selected( scene::Graph& graph, CopiedString& shader );
+void Scene_BrushGetShader_Selected( scene::Graph& graph, std::string& shader );
+void Scene_BrushGetShader_Component_Selected( scene::Graph& graph, std::string& shader );
 void Scene_BrushFindReplaceShader( scene::Graph& graph, const char* find, const char* replace );
 void Scene_BrushFindReplaceShader_Selected( scene::Graph& graph, const char* find, const char* replace );
 void Scene_BrushFindReplaceShader_Component_Selected( scene::Graph& graph, const char* find, const char* replace );
index 3ea279dacd7e06a06e7f38f0e84cdee04335df1e..779ab6bc512261726e3c69387815a1a9e2f9dceb 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "mainframe.h"
 
-typedef std::map<CopiedString, CopiedString> Variables;
+typedef std::map<std::string, std::string> Variables;
 Variables g_build_variables;
 
 void build_clear_variables(){
@@ -62,7 +62,7 @@ virtual void exportXML( XMLImporter& importer ) = 0;
 
 class VariableString : public Evaluatable
 {
-CopiedString m_string;
+std::string m_string;
 public:
 VariableString() : m_string(){
 }
@@ -293,7 +293,7 @@ void popElement( const char* name ){
 }
 };
 
-typedef std::pair<CopiedString, Build> BuildPair;
+typedef std::pair<std::string, Build> BuildPair;
 #define SEPARATOR_STRING "-"
 static bool is_separator( const BuildPair &p ){
        if ( !string_equal( p.first.c_str(), SEPARATOR_STRING ) ) {
@@ -350,7 +350,7 @@ Build::iterator Build_find( Build& build, std::size_t index ){
        return i;
 }
 
-typedef std::map<CopiedString, Tool> Tools;
+typedef std::map<std::string, Tool> Tools;
 
 class ProjectXMLConstructor : public XMLElementParser
 {
@@ -410,7 +410,7 @@ void popElement( const char* name ){
 
 class RootXMLConstructor : public XMLElementParser
 {
-CopiedString m_elementName;
+std::string m_elementName;
 XMLElementParser& m_parser;
 SkipAllParser m_skip;
 Version m_version;
@@ -950,7 +950,7 @@ GtkWindow* BuildMenuDialog_construct( ModalDialog& modal, ProjectList& projectLi
 
 namespace
 {
-CopiedString g_buildMenu;
+std::string g_buildMenu;
 }
 
 void LoadBuildMenu();
index f608ea49709348fbc4574bdb7d062ccd7312b18f..067a1258d52051f0bf56938ebaed909f1085b093 100644 (file)
@@ -34,7 +34,7 @@
 #include "gtkmisc.h"
 
 typedef std::pair<Accelerator, int> ShortcutValue; // accelerator, isRegistered
-typedef std::map<CopiedString, ShortcutValue> Shortcuts;
+typedef std::map<std::string, ShortcutValue> Shortcuts;
 
 void Shortcuts_foreach( Shortcuts& shortcuts, CommandVisitor& visitor ){
        for ( Shortcuts::iterator i = shortcuts.begin(); i != shortcuts.end(); ++i )
@@ -69,7 +69,7 @@ void GlobalShortcuts_reportUnregistered(){
        }
 }
 
-typedef std::map<CopiedString, Command> Commands;
+typedef std::map<std::string, Command> Commands;
 
 Commands g_commands;
 
@@ -84,7 +84,7 @@ const Command& GlobalCommands_find( const char* command ){
        return ( *i ).second;
 }
 
-typedef std::map<CopiedString, Toggle> Toggles;
+typedef std::map<std::string, Toggle> Toggles;
 
 
 Toggles g_toggles;
@@ -99,7 +99,7 @@ const Toggle& GlobalToggles_find( const char* name ){
        return ( *i ).second;
 }
 
-typedef std::map<CopiedString, KeyEvent> KeyEvents;
+typedef std::map<std::string, KeyEvent> KeyEvents;
 
 
 KeyEvents g_keyEvents;
index e98cac9212901178a72b793658ae43405ba9f71e..087d0439992df58d26075edf29b263aa0a93f82c 100644 (file)
@@ -139,7 +139,7 @@ typedef ImportExport<bool, bool, BoolImport, BoolExport> BoolImportExport;
 typedef ImportExport<int, int, IntImport, IntExport> IntImportExport;
 typedef ImportExport<std::size_t, std::size_t, SizeImport, SizeExport> SizeImportExport;
 typedef ImportExport<float, float, FloatImport, FloatExport> FloatImportExport;
-typedef ImportExport<CopiedString, const char*, StringImport, StringExport> StringImportExport;
+typedef ImportExport<std::string, const char*, StringImport, StringExport> StringImportExport;
 
 
 
@@ -401,7 +401,7 @@ void Dialog::AddDialogData( GtkToggleButton& widget, bool& data ){
 void Dialog::AddDialogData( GtkRadioButton& widget, int& data ){
        AddData<IntRadioImportExport, IntImportExport>( m_data ).apply( widget, data );
 }
-void Dialog::AddDialogData( GtkEntry& widget, CopiedString& data ){
+void Dialog::AddDialogData( GtkEntry& widget, std::string& data ){
        AddData<TextEntryImportExport, StringImportExport>( m_data ).apply( widget, data );
 }
 void Dialog::AddDialogData( GtkEntry& widget, int& data ){
@@ -627,7 +627,7 @@ GtkWidget* Dialog::addPathEntry( GtkWidget* vbox, const char* name, bool browse_
        return GTK_WIDGET( row );
 }
 
-GtkWidget* Dialog::addPathEntry( GtkWidget* vbox, const char* name, CopiedString& data, bool browse_directory ){
+GtkWidget* Dialog::addPathEntry( GtkWidget* vbox, const char* name, std::string& data, bool browse_directory ){
        return addPathEntry( vbox, name, browse_directory, StringImportCallback( StringImportCaller( data ) ), StringExportCallback( StringExportCaller( data ) ) );
 }
 
index 61e1580d90ad68a753f32ac80e6e64bff80e4516..3ed229e69f39da1f1554e60d4be4e7092bf8269c 100644 (file)
@@ -75,14 +75,14 @@ inline void FloatExport( float& self, const FloatImportCallback& importCallback
 typedef ReferenceCaller1<float, const FloatImportCallback&, FloatExport> FloatExportCaller;
 
 
-inline void StringImport( CopiedString& self, const char* value ){
+inline void StringImport( std::string& self, const char* value ){
        self = value;
 }
-typedef ReferenceCaller1<CopiedString, const char*, StringImport> StringImportCaller;
-inline void StringExport( CopiedString& self, const StringImportCallback& importCallback ){
+typedef ReferenceCaller1<std::string, const char*, StringImport> StringImportCaller;
+inline void StringExport( std::string& self, const StringImportCallback& importCallback ){
        importCallback( self.c_str() );
 }
-typedef ReferenceCaller1<CopiedString, const StringImportCallback&, StringExport> StringExportCaller;
+typedef ReferenceCaller1<std::string, const StringImportCallback&, StringExport> StringExportCaller;
 
 
 class DLG_DATA
@@ -162,7 +162,7 @@ GtkWidget* addEntry( GtkWidget* vbox, const char* name, float& data ){
        return addFloatEntry( vbox, name, FloatImportCaller( data ), FloatExportCaller( data ) );
 }
 GtkWidget* addPathEntry( GtkWidget* vbox, const char* name, bool browse_directory, const StringImportCallback& importCallback, const StringExportCallback& exportCallback );
-GtkWidget* addPathEntry( GtkWidget* vbox, const char* name, CopiedString& data, bool directory );
+GtkWidget* addPathEntry( GtkWidget* vbox, const char* name, std::string& data, bool directory );
 GtkWidget* addSpinner( GtkWidget* vbox, const char* name, int& data, double value, double lower, double upper );
 GtkWidget* addSpinner( GtkWidget* vbox, const char* name, double value, double lower, double upper, const IntImportCallback& importCallback, const IntExportCallback& exportCallback );
 GtkWidget* addSpinner( GtkWidget* vbox, const char* name, double value, double lower, double upper, const FloatImportCallback& importCallback, const FloatExportCallback& exportCallback );
@@ -182,7 +182,7 @@ void AddIntComboData( GtkComboBox& object, const IntImportCallback& importCallba
 
 void AddDialogData( GtkToggleButton& object, bool& data );
 void AddDialogData( GtkRadioButton& object, int& data );
-void AddDialogData( GtkEntry& object, CopiedString& data );
+void AddDialogData( GtkEntry& object, std::string& data );
 void AddDialogData( GtkEntry& object, int& data );
 void AddDialogData( GtkEntry& object, std::size_t& data );
 void AddDialogData( GtkEntry& object, float& data );
index c74c7b72ee257013d59908b30a4ee4e81cf539d9..741cdcf863257549339be42e324f6960f5239b71 100644 (file)
@@ -46,7 +46,7 @@ typedef std::map<const char*, EntityClass*, RawStringLessNoCase> EntityClasses;
 EntityClasses g_entityClasses;
 EntityClass   *eclass_bad = 0;
 //char eclass_directory[1024];
-typedef std::map<CopiedString, ListAttributeType> ListAttributeTypes;
+typedef std::map<std::string, ListAttributeType> ListAttributeTypes;
 ListAttributeTypes g_listTypes;
 }
 
@@ -168,12 +168,12 @@ void operator()( const char* name ) const {
 
 struct PathLess
 {
-       bool operator()( const CopiedString& path, const CopiedString& other ) const {
+       bool operator()( const std::string& path, const std::string& other ) const {
                return path_less( path.c_str(), other.c_str() );
        }
 };
 
-typedef std::map<CopiedString, const char*, PathLess> Paths;
+typedef std::map<std::string, const char*, PathLess> Paths;
 
 class PathsInsert
 {
index 8637b4800c186e1ff3c23d260fe904779ca4fc7f..f43743426bfd7e8dfed968b020ae7ee87e8c9033 100644 (file)
@@ -155,7 +155,7 @@ const char* Get_COM_Token(){
 
 const char *debugname;
 
-void setSpecialLoad( EntityClass *e, const char* pWhat, CopiedString& p ){
+void setSpecialLoad( EntityClass *e, const char* pWhat, std::string& p ){
        // Hydra: removed some amazingly bad cstring usage, whoever wrote that
        // needs to be taken out and shot.
 
index 6c4bb022bc42da24c8ef09dd2beb5bb51b8f3acd..f71a917e3d8fe2f2525239c76c5e9c3ad513436d 100644 (file)
@@ -105,7 +105,7 @@ bool EntityClassDoom3_parseString( Tokeniser& tokeniser, const char*& s ){
        return true;
 }
 
-bool EntityClassDoom3_parseString( Tokeniser& tokeniser, CopiedString& s ){
+bool EntityClassDoom3_parseString( Tokeniser& tokeniser, std::string& s ){
        const char* token = tokeniser.getToken();
        PARSE_RETURN_FALSE_IF_FAIL( token != 0 );
        s = token;
@@ -152,16 +152,16 @@ class Model
 {
 public:
 bool m_resolved;
-CopiedString m_mesh;
-CopiedString m_skin;
-CopiedString m_parent;
-typedef std::map<CopiedString, CopiedString> Anims;
+std::string m_mesh;
+std::string m_skin;
+std::string m_parent;
+typedef std::map<std::string, std::string> Anims;
 Anims m_anims;
 Model() : m_resolved( false ){
 }
 };
 
-typedef std::map<CopiedString, Model> Models;
+typedef std::map<std::string, Model> Models;
 
 Models g_models;
 
@@ -241,7 +241,7 @@ bool EntityClassDoom3_parseModel( Tokeniser& tokeniser ){
                        }
                }
                else if ( string_equal( parameter, "anim" ) ) {
-                       CopiedString animName;
+                       std::string animName;
                        PARSE_RETURN_FALSE_IF_FAIL( EntityClassDoom3_parseString( tokeniser, animName ) );
                        const char* animFile;
                        PARSE_RETURN_FALSE_IF_FAIL( EntityClassDoom3_parseString( tokeniser, animFile ) );
@@ -319,7 +319,7 @@ static bool EntityClass_parse( EntityClass& entityClass, Tokeniser& tokeniser ){
 
        StringOutputStream usage( 256 );
        StringOutputStream description( 256 );
-       CopiedString* currentDescription = 0;
+       std::string* currentDescription = 0;
        StringOutputStream* currentString = 0;
 
        for (;; )
@@ -328,7 +328,7 @@ static bool EntityClass_parse( EntityClass& entityClass, Tokeniser& tokeniser ){
                PARSE_RETURN_FALSE_IF_FAIL( EntityClassDoom3_parseString( tokeniser, key ) );
 
                const char* last = string_findFirstSpaceOrTab( key );
-               CopiedString first( StringRange( key, last ) );
+               std::string first( StringRange( key, last ) );
 
                if ( !string_empty( last ) ) {
                        last = string_findFirstNonSpaceOrTab( last );
@@ -501,7 +501,7 @@ static bool EntityClass_parse( EntityClass& entityClass, Tokeniser& tokeniser ){
                // end ignore prey entity keys
                else
                {
-                       CopiedString tmp( key );
+                       std::string tmp( key );
                        ASSERT_MESSAGE( !string_equal_n( key, "editor_", 7 ), "unsupported editor key: " << makeQuoted( key ) );
                        EntityClassAttribute& attribute = EntityClass_insertAttribute( entityClass, key ).second;
                        attribute.m_type = "string";
@@ -598,7 +598,7 @@ bool EntityClassDoom3_parse( TextInputStream& inputStream, const char* filename
                if ( blockType == 0 ) {
                        return true;
                }
-               CopiedString tmp( blockType );
+               std::string tmp( blockType );
                if ( !EntityClassDoom3_parseBlock( tokeniser, tmp.c_str() ) ) {
                        globalErrorStream() << GlobalFileSystem().findFile( filename ) << filename << ":" << (unsigned int)tokeniser.getLine() << ": " << tmp.c_str() << " parse failed, skipping rest of file\n";
                        return false;
index 7b87791520b4c5365acf8d92fbafe8383bf5a33d..e2649113640417ca8b6f35f38cbae46636664486 100644 (file)
@@ -45,7 +45,7 @@ EntityClasses g_EntityClassFGD_classes;
 typedef std::map<const char*, EntityClass*, RawStringLess> BaseClasses;
 BaseClasses g_EntityClassFGD_bases;
 EntityClass   *g_EntityClassFGD_bad = 0;
-typedef std::map<CopiedString, ListAttributeType> ListAttributeTypes;
+typedef std::map<std::string, ListAttributeType> ListAttributeTypes;
 ListAttributeTypes g_listTypesFGD;
 }
 
@@ -93,7 +93,7 @@ inline bool EntityClassFGD_parseToken( Tokeniser& tokeniser, const char* token )
 
 #define PARSE_ERROR "error parsing entity class definition"
 
-void EntityClassFGD_parseSplitString( Tokeniser& tokeniser, CopiedString& string ){
+void EntityClassFGD_parseSplitString( Tokeniser& tokeniser, std::string& string ){
        StringOutputStream buffer( 256 );
        for (;; )
        {
@@ -249,7 +249,7 @@ void EntityClassFGD_parseClass( Tokeniser& tokeniser, bool fixedsize, bool isBas
 
        for (;; )
        {
-               CopiedString key = tokeniser.getToken();
+               std::string key = tokeniser.getToken();
                if ( string_equal( key.c_str(), "]" ) ) {
                        tokeniser.nextLine();
                        break;
@@ -265,7 +265,7 @@ void EntityClassFGD_parseClass( Tokeniser& tokeniser, bool fixedsize, bool isBas
                                ASSERT_MESSAGE( EntityClassFGD_parseToken( tokeniser, ")" ), PARSE_ERROR );
                                const char* descriptionSeparator = tokeniser.getToken();
                                if ( string_equal( descriptionSeparator, ":" ) ) {
-                                       CopiedString description;
+                                       std::string description;
                                        EntityClassFGD_parseSplitString( tokeniser, description );
                                }
                                else
@@ -278,7 +278,7 @@ void EntityClassFGD_parseClass( Tokeniser& tokeniser, bool fixedsize, bool isBas
                }
 
                ASSERT_MESSAGE( EntityClassFGD_parseToken( tokeniser, "(" ), PARSE_ERROR );
-               CopiedString type = tokeniser.getToken();
+               std::string type = tokeniser.getToken();
                ASSERT_MESSAGE( EntityClassFGD_parseToken( tokeniser, ")" ), PARSE_ERROR );
 
                if ( string_equal_nocase( type.c_str(), "flags" ) ) {
@@ -375,7 +375,7 @@ void EntityClassFGD_parseClass( Tokeniser& tokeniser, bool fixedsize, bool isBas
                                }
                                else
                                {
-                                       CopiedString tmp( value );
+                                       std::string tmp( value );
                                        ASSERT_MESSAGE( EntityClassFGD_parseToken( tokeniser, ":" ), PARSE_ERROR );
                                        const char* name = tokeniser.getToken();
                                        listType.push_back( name, tmp.c_str() );
index 687d4adf0ffb94b46cd1392f0b9e52d11af98831..db60afd6bd3c93745c78b901cd18b2e6ae3c763f 100644 (file)
@@ -250,7 +250,7 @@ bool attributeSupported( const char* name ){
                   || string_equal( name, "integer2" );
 }
 
-typedef std::map<CopiedString, ListAttributeType> ListAttributeTypes;
+typedef std::map<std::string, ListAttributeType> ListAttributeTypes;
 
 bool listAttributeSupported( ListAttributeTypes& listTypes, const char* name ){
        return listTypes.find( name ) != listTypes.end();
index 859050ec1027cccbd25f7915bcd724f710bb6f0d..550353d1663bdb3597d4ea8e2aff466a13263998 100644 (file)
@@ -87,7 +87,7 @@ GtkEntry* numeric_entry_new(){
 
 namespace
 {
-typedef std::map<CopiedString, CopiedString> KeyValues;
+typedef std::map<std::string, std::string> KeyValues;
 KeyValues g_selectedKeyValues;
 KeyValues g_selectedDefaultKeyValues;
 }
@@ -126,7 +126,7 @@ virtual void release() = 0;
 
 class BooleanAttribute : public EntityAttribute
 {
-CopiedString m_key;
+std::string m_key;
 GtkCheckButton* m_check;
 
 static gboolean toggled( GtkWidget *widget, BooleanAttribute* self ){
@@ -174,7 +174,7 @@ typedef MemberCaller<BooleanAttribute, &BooleanAttribute::update> UpdateCaller;
 
 class StringAttribute : public EntityAttribute
 {
-CopiedString m_key;
+std::string m_key;
 GtkEntry* m_entry;
 NonModalEntry m_nonModal;
 public:
@@ -225,7 +225,7 @@ ShaderAttribute( const char* key ) : StringAttribute( key ){
 
 class ModelAttribute : public EntityAttribute
 {
-CopiedString m_key;
+std::string m_key;
 BrowsedPathEntry m_entry;
 NonModalEntry m_nonModal;
 public:
@@ -288,7 +288,7 @@ const char* browse_sound( GtkWidget* parent ){
 
 class SoundAttribute : public EntityAttribute
 {
-CopiedString m_key;
+std::string m_key;
 BrowsedPathEntry m_entry;
 NonModalEntry m_nonModal;
 public:
@@ -333,7 +333,7 @@ inline double angle_normalised( double angle ){
 
 class AngleAttribute : public EntityAttribute
 {
-CopiedString m_key;
+std::string m_key;
 GtkEntry* m_entry;
 NonModalEntry m_nonModal;
 public:
@@ -381,7 +381,7 @@ const String buttons[] = { "up", "down", "z-axis" };
 
 class DirectionAttribute : public EntityAttribute
 {
-CopiedString m_key;
+std::string m_key;
 GtkEntry* m_entry;
 NonModalEntry m_nonModal;
 RadioHBox m_radio;
@@ -479,7 +479,7 @@ typedef BasicVector3<double> DoubleVector3;
 
 class AnglesAttribute : public EntityAttribute
 {
-CopiedString m_key;
+std::string m_key;
 AnglesEntry m_angles;
 NonModalEntry m_nonModal;
 GtkBox* m_hbox;
@@ -566,7 +566,7 @@ Vector3Entry() : m_x( 0 ), m_y( 0 ), m_z( 0 ){
 
 class Vector3Attribute : public EntityAttribute
 {
-CopiedString m_key;
+std::string m_key;
 Vector3Entry m_vector3;
 NonModalEntry m_nonModal;
 GtkBox* m_hbox;
@@ -666,7 +666,7 @@ void setActive( GtkComboBox* combo, int value ){
 
 class ListAttribute : public EntityAttribute
 {
-CopiedString m_key;
+std::string m_key;
 GtkComboBox* m_combo;
 NonModalComboBox m_nonModal;
 const ListAttributeType& m_type;
@@ -767,7 +767,7 @@ GetKeyValueVisitor( KeyValues& keyvalues )
 }
 
 void visit( const char* key, const char* value ){
-       m_keyvalues.insert( KeyValues::value_type( CopiedString( key ), CopiedString( value ) ) );
+       m_keyvalues.insert( KeyValues::value_type( std::string( key ), std::string( value ) ) );
 }
 
 };
@@ -809,7 +809,7 @@ public:
 }
 
 const char* keyvalues_valueforkey( KeyValues& keyvalues, const char* key ){
-       KeyValues::iterator i = keyvalues.find( CopiedString( key ) );
+       KeyValues::iterator i = keyvalues.find( std::string( key ) );
        if ( i != keyvalues.end() ) {
                return ( *i ).second.c_str();
        }
@@ -1052,8 +1052,8 @@ void EntityInspector_updateKeyValues(){
 
        // save current key/val pair around filling epair box
        // row_select wipes it and sets to first in list
-       CopiedString strKey( gtk_entry_get_text( g_entityKeyEntry ) );
-       CopiedString strVal( gtk_entry_get_text( g_entityValueEntry ) );
+       std::string strKey( gtk_entry_get_text( g_entityKeyEntry ) );
+       std::string strVal( gtk_entry_get_text( g_entityValueEntry ) );
 
        gtk_list_store_clear( store );
        // Walk through list and add pairs
index 232b3582cae011860a142835bee8f7d8fb7c7f45..a15b66ee9537ceb6858b0922dd485131f0f8276a 100644 (file)
@@ -157,8 +157,8 @@ void gamedetect(){
 
 namespace
 {
-CopiedString home_path;
-CopiedString app_path;
+std::string home_path;
+std::string app_path;
 }
 
 const char* environment_get_home_path(){
index cfb3cc6f76623af76492bc4bcb115c66fba90e23..1fb9d8b5863daf042c34355fb36445921d975f2b 100644 (file)
@@ -48,12 +48,12 @@ struct filetype_copy_t
        bool m_can_import;
        bool m_can_save;
 private:
-       CopiedString m_moduleName;
-       CopiedString m_name;
-       CopiedString m_pattern;
+       std::string m_moduleName;
+       std::string m_name;
+       std::string m_pattern;
 };
 typedef std::vector<filetype_copy_t> filetype_list_t;
-std::map<CopiedString, filetype_list_t> m_typelists;
+std::map<std::string, filetype_list_t> m_typelists;
 public:
 RadiantFileTypeRegistry(){
        addType( "*", "*", filetype_t( "All Files", "*.*" ) );
index 83ac42f054d8481a664bf43d9f0c43831891f2c6..e2cf267390f41083c839a5869fcbf1c8279ff71c 100644 (file)
@@ -77,8 +77,8 @@ void destroyWindow(){
 
 
 bool m_bSelectedOnly;
-CopiedString m_strFind;
-CopiedString m_strReplace;
+std::string m_strFind;
+std::string m_strReplace;
 };
 
 FindTextureDialog g_FindTextureDialog;
index e35b467e70cd16cd5052ea6bb3b1ce1a1624b58e..5a887b293c5242b22891ad7b0ad9028f2e19ba66 100644 (file)
@@ -923,7 +923,7 @@ EMessageBoxReturn DoLightIntensityDlg( int *intensity ){
 // =============================================================================
 // Add new shader tag dialog
 
-EMessageBoxReturn DoShaderTagDlg( CopiedString* tag, const char* title ){
+EMessageBoxReturn DoShaderTagDlg( std::string* tag, const char* title ){
        ModalDialog dialog;
        GtkEntry* textentry;
        ModalDialogButton ok_button( dialog, eIDOK );
@@ -1047,7 +1047,7 @@ bool g_TextEditor_useWin32Editor = true;
 #else
 // custom shader editor
 bool g_TextEditor_useCustomEditor = false;
-CopiedString g_TextEditor_editorCommand( "" );
+std::string g_TextEditor_editorCommand( "" );
 #endif
 
 void DoTextEditor( const char* filename, int cursorpos ){
index 05f8b8b9ea38c31b9d42cac79d0f4664b8610e56..8f079072221dd93ec76b420c9f85b5e92648e97c 100644 (file)
@@ -35,7 +35,7 @@
 #include "string/string.h"
 
 EMessageBoxReturn DoLightIntensityDlg( int *intensity );
-EMessageBoxReturn DoShaderTagDlg( CopiedString *tag, const char* title );
+EMessageBoxReturn DoShaderTagDlg( std::string *tag, const char* title );
 EMessageBoxReturn DoShaderInfoDlg( const char* name, const char* filename, const char* title );
 EMessageBoxReturn DoTextureLayout( float *fx, float *fy );
 void DoTextEditor( const char* filename, int cursorpos );
@@ -50,9 +50,9 @@ void DoAbout();
 #ifdef WIN32
 extern bool g_TextEditor_useWin32Editor;
 #else
-#include "string/stringfwd.h"
+#include <string>
 extern bool g_TextEditor_useCustomEditor;
-extern CopiedString g_TextEditor_editorCommand;
+extern std::string g_TextEditor_editorCommand;
 #endif
 
 
index d5319f30c0469575d9091c8baa81e483b56c7914..d5157426ec8c74cb2b17283ac8ce02b52d4e0ddc 100644 (file)
  */
 namespace
 {
-std::list<CopiedString> mHelpURLs;
+std::list<std::string> mHelpURLs;
 }
 
 /*!
    needed for hooking in Gtk+
  */
-void HandleHelpCommand( CopiedString& str ){
+void HandleHelpCommand( std::string& str ){
        OpenURL( str.c_str() );
 }
 
@@ -71,7 +71,7 @@ void process_xlink( const char* filename, const char *menu_name, const char *bas
                                {
                                        if ( !strcmp( (const char*)pNode->name, "item" ) ) {
                                                // process the URL
-                                               CopiedString url;
+                                               std::string url;
 
                                                xmlChar* prop = xmlGetProp( pNode, reinterpret_cast<const xmlChar*>( "url" ) );
                                                ASSERT_NOTNULL( prop );
@@ -93,7 +93,7 @@ void process_xlink( const char* filename, const char *menu_name, const char *bas
 
                                                prop = xmlGetProp( pNode, reinterpret_cast<const xmlChar*>( "name" ) );
                                                ASSERT_NOTNULL( prop );
-                                               create_menu_item_with_mnemonic( menu_in_menu, reinterpret_cast<const char*>( prop ), ReferenceCaller<CopiedString, HandleHelpCommand>( mHelpURLs.back() ) );
+                                               create_menu_item_with_mnemonic( menu_in_menu, reinterpret_cast<const char*>( prop ), ReferenceCaller<std::string, HandleHelpCommand>( mHelpURLs.back() ) );
                                                xmlFree( prop );
                                        }
                                        pNode = pNode->next;
index c669aba41f4d5367024720aa6ed6a2d2c9f04b11..78d10c892695ff434e3dfc096bb127d128be8554 100644 (file)
@@ -39,7 +39,7 @@
    \link os/path.h os/path.h \endlink - Path manipulation for radiant's standard path format \n
    \link os/file.h os/file.h \endlink - OS file-system access. \n
 
-   ::CopiedString - automatic string memory management \n
+   ::std::string - automatic string memory management \n
    Array - automatic array memory management \n
    HashTable - generic hashtable, similar to std::hash_map \n
 
index 7e04d46a71486ea41f12ee63282d2ba38b416c25..14f131f51daa1ad04fe250c4fc7501cc649c0f49 100644 (file)
@@ -305,7 +305,7 @@ void HomePaths_Destroy(){
 
 // Engine Path
 
-CopiedString g_strEnginePath;
+std::string g_strEnginePath;
 ModuleObservers g_enginePathObservers;
 std::size_t g_enginepath_unrealised = 1;
 
@@ -367,7 +367,7 @@ void setEnginePath( const char* path ){
 
 // App Path
 
-CopiedString g_strAppPath;                 ///< holds the full path of the executable
+std::string g_strAppPath;                 ///< holds the full path of the executable
 
 const char* AppPath_get(){
        return g_strAppPath.c_str();
@@ -375,7 +375,7 @@ const char* AppPath_get(){
 
 /// the path to the local rc-dir
 const char* LocalRcPath_get( void ){
-       static CopiedString rc_path;
+       static std::string rc_path;
        if ( rc_path.empty() ) {
                StringOutputStream stream( 256 );
                stream << GlobalRadiant().getSettingsPath() << g_pGameDescription->mGameFile.c_str() << "/";
@@ -386,7 +386,7 @@ const char* LocalRcPath_get( void ){
 
 /// directory for temp files
 /// NOTE: on *nix this is were we check for .pid
-CopiedString g_strSettingsPath;
+std::string g_strSettingsPath;
 const char* SettingsPath_get(){
        return g_strSettingsPath.c_str();
 }
@@ -401,16 +401,16 @@ const char* SettingsPath_get(){
    [GameToolsPath]/modules
    and also q3map, bspc
  */
-CopiedString g_strGameToolsPath;           ///< this is set by g_GamesDialog
+std::string g_strGameToolsPath;           ///< this is set by g_GamesDialog
 
 const char* GameToolsPath_get(){
        return g_strGameToolsPath.c_str();
 }
 
-void EnginePathImport( CopiedString& self, const char* value ){
+void EnginePathImport( std::string& self, const char* value ){
        setEnginePath( value );
 }
-typedef ReferenceCaller1<CopiedString, const char*, EnginePathImport> EnginePathImportCaller;
+typedef ReferenceCaller1<std::string, const char*, EnginePathImport> EnginePathImportCaller;
 
 void Paths_constructPreferences( PreferencesPage& page ){
        page.appendPathEntry( "Engine Path", true,
@@ -457,8 +457,8 @@ void EnginePath_verify(){
 
 namespace
 {
-CopiedString g_gamename;
-CopiedString g_gamemode;
+std::string g_gamename;
+std::string g_gamemode;
 ModuleObservers g_gameNameObservers;
 ModuleObservers g_gameModeObservers;
 }
@@ -1678,7 +1678,7 @@ bool MainFrame_isActiveApp(){
        return false;
 }
 
-typedef std::list<CopiedString> StringStack;
+typedef std::list<std::string> StringStack;
 StringStack g_wait_stack;
 WaitDialog g_wait;
 
@@ -3059,7 +3059,7 @@ void MainFrame::UpdateStatusText(){
        m_idleRedrawStatusText.queueDraw();
 }
 
-void MainFrame::SetStatusText( CopiedString& status_text, const char* pText ){
+void MainFrame::SetStatusText( std::string& status_text, const char* pText ){
        status_text = pText;
        UpdateStatusText();
 }
index 0b008a6b4625ff38c0829ebfb6b4c55796aa7874..95d61670eee5459232ec7b67a1bcb0ad173f2481 100644 (file)
@@ -62,11 +62,11 @@ MainFrame();
 
 GtkWindow* m_window;
 
-CopiedString m_command_status;
-CopiedString m_position_status;
-CopiedString m_brushcount_status;
-CopiedString m_texture_status;
-CopiedString m_grid_status;
+std::string m_command_status;
+std::string m_position_status;
+std::string m_brushcount_status;
+std::string m_texture_status;
+std::string m_grid_status;
 private:
 
 void Create();
@@ -101,7 +101,7 @@ bool IsSleeping(){
 }
 void OnSleep();
 
-void SetStatusText( CopiedString& status_text, const char* pText );
+void SetStatusText( std::string& status_text, const char* pText );
 void UpdateStatusText();
 void RedrawStatusText();
 typedef MemberCaller<MainFrame, &MainFrame::RedrawStatusText> RedrawStatusTextCaller;
@@ -202,15 +202,15 @@ void Radiant_detachEnginePathObserver( ModuleObserver& observer );
 void Radiant_attachGameToolsPathObserver( ModuleObserver& observer );
 void Radiant_detachGameToolsPathObserver( ModuleObserver& observer );
 
-extern CopiedString g_strEnginePath;
+extern std::string g_strEnginePath;
 void EnginePath_verify();
 const char* EnginePath_get();
 const char* QERApp_GetGamePath();
 
-extern CopiedString g_strAppPath;
+extern std::string g_strAppPath;
 const char* AppPath_get();
 
-extern CopiedString g_strSettingsPath;
+extern std::string g_strSettingsPath;
 const char* SettingsPath_get();
 
 const char* LocalRcPath_get( void );
@@ -218,7 +218,7 @@ const char* LocalRcPath_get( void );
 const char* const g_pluginsDir = "plugins/"; ///< name of plugins directory, always sub-directory of toolspath
 const char* const g_modulesDir = "modules/"; ///< name of modules directory, always sub-directory of toolspath
 
-extern CopiedString g_strGameToolsPath;
+extern std::string g_strGameToolsPath;
 const char* GameToolsPath_get();
 
 void Radiant_Initialise();
index fae78de3692376068e22060520195a0cdf1a3ad5..44633afa11876ab1722cc4b1fa5acbe4e4c6879c 100644 (file)
@@ -90,7 +90,7 @@ MapModules& ReferenceAPI_getMapModules();
 class NameObserver
 {
 UniqueNames& m_names;
-CopiedString m_name;
+std::string m_name;
 
 void construct(){
        if ( !empty() ) {
@@ -161,7 +161,7 @@ void makeUnique( const char* name, const NameCallback& setName ) const {
 
 void mergeNames( const BasicNamespace& other ) const {
        typedef std::list<NameCallback> SetNameCallbacks;
-       typedef std::map<CopiedString, SetNameCallbacks> NameGroups;
+       typedef std::map<std::string, SetNameCallbacks> NameGroups;
        NameGroups groups;
 
        UniqueNames uniqueNames( other.m_uniqueNames );
@@ -284,7 +284,7 @@ void Map_SetWorldspawn( Map& map, scene::Node* node );
 class Map : public ModuleObserver
 {
 public:
-CopiedString m_name;
+std::string m_name;
 Resource* m_resource;
 bool m_valid;
 
@@ -734,7 +734,7 @@ scene::Node& Node_Clone( scene::Node& node ){
 }
 
 
-typedef std::map<CopiedString, std::size_t> EntityBreakdown;
+typedef std::map<std::string, std::size_t> EntityBreakdown;
 
 class EntityBreakdownWalker : public scene::Graph::Walker
 {
@@ -1768,7 +1768,7 @@ void NewMap(){
        }
 }
 
-CopiedString g_mapsPath;
+std::string g_mapsPath;
 
 const char* getMapsPath(){
        return g_mapsPath.c_str();
@@ -2142,7 +2142,7 @@ MapModuleObserver g_MapModuleObserver;
 
 #include "preferencesystem.h"
 
-CopiedString g_strLastMap;
+std::string g_strLastMap;
 bool g_bLoadLastMap = false;
 
 void Map_Construct(){
index a359d46159a676405df4523b4961573c41f1d10a..36be62b577eddf15333abdd1948c26aa63dd142f 100644 (file)
@@ -25,7 +25,7 @@
 #include "iscenegraph.h"
 #include "generic/callback.h"
 #include "signal/signalfwd.h"
-#include "string/stringfwd.h"
+#include <string>
 
 class Map;
 extern Map g_map;
@@ -149,7 +149,7 @@ void Map_Traverse( scene::Node& root, const scene::Traversable::Walker& walker )
 
 void SelectBrush( int entitynum, int brushnum );
 
-extern CopiedString g_strLastMap;
+extern std::string g_strLastMap;
 extern bool g_bLoadLastMap;
 
 void Map_Construct();
index cb833010f3bc74fa0f0886269e423673ccf979d6..a30de609a79808468bd0fc4909e6def0547b5ffb 100644 (file)
@@ -38,7 +38,7 @@
 namespace {
 GtkMenuItem *MRU_items[MRU_MAX];
 std::size_t MRU_used;
-typedef CopiedString MRU_filename_t;
+typedef std::string MRU_filename_t;
 MRU_filename_t MRU_filenames[MRU_MAX];
 typedef const char* MRU_key_t;
 MRU_key_t MRU_keys[MRU_MAX] = { "File0", "File1", "File2", "File3" };
index a1f1d272a20a682bb987337d12f8f481925d787b..cadb0e13bf9de03696f902615d67ba4510af09df 100644 (file)
@@ -392,7 +392,7 @@ void release(){
 }
 
 std::size_t m_width, m_height;
-CopiedString m_shader;
+std::string m_shader;
 PatchControlArray m_ctrl;
 bool m_patchDef3;
 std::size_t m_subdivisions_x;
@@ -414,7 +414,7 @@ scene::Node* m_node;
 
 AABB m_aabb_local;   // local bbox
 
-CopiedString m_shader;
+std::string m_shader;
 Shader* m_state;
 
 std::size_t m_width;
index 73639e5463756bf4b3686d29b0b48d7662d5b71f..29d8d1959a8d55817a977ae967c673dd018b7ffe 100644 (file)
@@ -222,7 +222,7 @@ WindowPositionTracker m_position_tracker;
 
 Patch *m_Patch;
 
-CopiedString m_strName;
+std::string m_strName;
 float m_fS;
 float m_fT;
 float m_fX;
index 4dd03828f1cf925494db17333830ef86935af95e..a2ab39ee59ccd2b1645541eb09064cb673b07279 100644 (file)
@@ -341,7 +341,7 @@ void Scene_PatchSetShader_Selected( scene::Graph& graph, const char* name ){
        SceneChangeNotify();
 }
 
-void Scene_PatchGetShader_Selected( scene::Graph& graph, CopiedString& name ){
+void Scene_PatchGetShader_Selected( scene::Graph& graph, std::string& name ){
        Patch* patch = Scene_GetUltimateSelectedVisiblePatch();
        if ( patch != 0 ) {
                name = patch->GetShader();
index 47f7f2248e201e26aeb70d7cdb8eabcd3ad406fc..5c776ccf956435b6feb22643c6480bdb19281be4 100644 (file)
@@ -22,7 +22,7 @@
 #if !defined ( INCLUDED_PATCHMANIP_H )
 #define INCLUDED_PATCHMANIP_H
 
-#include "string/stringfwd.h"
+#include <string>
 
 void Patch_registerCommands();
 typedef struct _GtkToolbar GtkToolbar;
@@ -36,7 +36,7 @@ class Graph;
 }
 
 void Scene_PatchSetShader_Selected( scene::Graph& graph, const char* name );
-void Scene_PatchGetShader_Selected( scene::Graph& graph, CopiedString& name );
+void Scene_PatchGetShader_Selected( scene::Graph& graph, std::string& name );
 void Scene_PatchSelectByShader( scene::Graph& graph, const char* name );
 void Scene_PatchFindReplaceShader( scene::Graph& graph, const char* find, const char* replace );
 void Scene_PatchFindReplaceShader_Selected( scene::Graph& graph, const char* find, const char* replace );
index 30cc0c2390e42ddc6f6ad6b3892d73a8ac81c31b..8d90f18e720e1bc1762adf56a4b9a6c83be85b5a 100644 (file)
 /* plugin manager --------------------------------------- */
 class CPluginSlot : public IPlugIn
 {
-CopiedString m_menu_name;
+std::string m_menu_name;
 const _QERPluginTable *mpTable;
-std::list<CopiedString> m_CommandStrings;
-std::list<CopiedString> m_CommandTitleStrings;
+std::list<std::string> m_CommandStrings;
+std::list<std::string> m_CommandTitleStrings;
 std::list<std::size_t> m_CommandIDs;
 
 public:
@@ -109,14 +109,14 @@ std::size_t CPluginSlot::getCommandCount(){
 }
 
 const char* CPluginSlot::getCommand( std::size_t n ){
-       std::list<CopiedString>::iterator i = m_CommandStrings.begin();
+       std::list<std::string>::iterator i = m_CommandStrings.begin();
        while ( n-- != 0 )
                ++i;
        return ( *i ).c_str();
 }
 
 const char* CPluginSlot::getCommandTitle( std::size_t n ){
-       std::list<CopiedString>::iterator i = m_CommandTitleStrings.begin();
+       std::list<std::string>::iterator i = m_CommandTitleStrings.begin();
        while ( n-- != 0 )
                ++i;
        return ( *i ).c_str();
index ce3f768685b40ff5d696fe5c5381434fc24a9a31..ca4baab196b4204c53f139bdbf3ba5f2bcce8238 100644 (file)
@@ -47,10 +47,10 @@ void exportString( const StringImportCallback& importer ){
 }
 };
 
-typedef std::map<CopiedString, PreferenceEntry> PreferenceEntries;
+typedef std::map<std::string, PreferenceEntry> PreferenceEntries;
 PreferenceEntries m_preferences;
 
-typedef std::map<CopiedString, CopiedString> PreferenceCache;
+typedef std::map<std::string, std::string> PreferenceCache;
 PreferenceCache m_cache;
 
 public:
@@ -185,7 +185,7 @@ struct xml_state_t
        }
 
        ETag m_tag;
-       CopiedString m_name;
+       std::string m_name;
        StringOutputStream m_ostream;
 };
 
index 4209fdb35d6c5196fc1cae7e0c1909b2663d414b..1e2251d3e644e3871f75d2f4f1d3afa1fc3539ff 100644 (file)
@@ -113,7 +113,7 @@ inline const char* xmlAttr_getValue( xmlAttrPtr attr ){
        return reinterpret_cast<const char*>( attr->children->content );
 }
 
-CGameDescription::CGameDescription( xmlDocPtr pDoc, const CopiedString& gameFile ){
+CGameDescription::CGameDescription( xmlDocPtr pDoc, const std::string& gameFile ){
        // read the user-friendly game name
        xmlNodePtr pNode = pDoc->children;
 
index 8793d03904b091a075b6cdf1a8969a09d7100b28..b6cded4e7f8a0b192dc22475e16f067f6a42e550 100644 (file)
@@ -91,7 +91,7 @@ GtkWidget* appendEntry( const char* name, float& data ){
 GtkWidget* appendPathEntry( const char* name, bool browse_directory, const StringImportCallback& importCallback, const StringExportCallback& exportCallback ){
        return m_dialog.addPathEntry( m_vbox, name, browse_directory, importCallback, exportCallback );
 }
-GtkWidget* appendPathEntry( const char* name, CopiedString& data, bool directory ){
+GtkWidget* appendPathEntry( const char* name, std::string& data, bool directory ){
        return m_dialog.addPathEntry( m_vbox, name, data, directory );
 }
 GtkWidget* appendSpinner( const char* name, int& data, double value, double lower, double upper ){
@@ -165,14 +165,14 @@ typedef MemberCaller1<LatchedInt, int, &LatchedInt::import> LatchedIntImportCall
  */
 class CGameDescription
 {
-typedef std::map<CopiedString, CopiedString> GameDescription;
+typedef std::map<std::string, std::string> GameDescription;
 
 public:
-CopiedString mGameFile;   ///< the .game file that describes this game
+std::string mGameFile;   ///< the .game file that describes this game
 GameDescription m_gameDescription;
 
-CopiedString mGameToolsPath;   ///< the explicit path to the game-dependent modules
-CopiedString mGameType;   ///< the type of the engine
+std::string mGameToolsPath;   ///< the explicit path to the game-dependent modules
+std::string mGameType;   ///< the type of the engine
 
 const char* getKeyValue( const char* key ) const {
        GameDescription::const_iterator i = m_gameDescription.find( key );
@@ -190,7 +190,7 @@ const char* getRequiredKeyValue( const char* key ) const {
        return "";
 }
 
-CGameDescription( xmlDocPtr pDoc, const CopiedString &GameFile );
+CGameDescription( xmlDocPtr pDoc, const std::string &GameFile );
 
 void Dump();
 };
@@ -226,7 +226,7 @@ public:
    what game has been selected
    this is the name of the .game file
  */
-CopiedString m_sGameFile;
+std::string m_sGameFile;
 /*!
    prompt which game to load on startup
  */
index 88ff41aa3b035e4a6fde510a2cf8552b22ccf26e..cd76f49220e45f9d5b046a6325879bbde4c0aad7 100644 (file)
@@ -48,11 +48,11 @@ typedef struct
           win32: engine full path.
           unix: user home full path + engine dir.
         */
-       CopiedString m_userEnginePath;
+       std::string m_userEnginePath;
        /*!
           cache for m_userEnginePath + mod subdirectory.
         */
-       CopiedString m_userGamePath;
+       std::string m_userGamePath;
 
 } QEGlobals_t;
 
index ee3ab8061e17f4a16201458e6b66d641cfb4eef0..e4e03c40d67e62abb5da95876271a5c2e8d4108d 100644 (file)
@@ -215,7 +215,7 @@ inline hash_t path_hash( const char* path, hash_t previous = 0 ){
 
 struct PathEqual
 {
-       bool operator()( const CopiedString& path, const CopiedString& other ) const {
+       bool operator()( const std::string& path, const std::string& other ) const {
                return path_equal( path.c_str(), other.c_str() );
        }
 };
@@ -223,12 +223,12 @@ struct PathEqual
 struct PathHash
 {
        typedef hash_t hash_type;
-       hash_type operator()( const CopiedString& path ) const {
+       hash_type operator()( const std::string& path ) const {
                return path_hash( path.c_str() );
        }
 };
 
-typedef std::pair<CopiedString, CopiedString> ModelKey;
+typedef std::pair<std::string, std::string> ModelKey;
 
 struct ModelKeyEqual
 {
@@ -322,16 +322,16 @@ const char* rootPath( const char* name ){
 struct ModelResource : public Resource
 {
        NodeSmartReference m_model;
-       const CopiedString m_originalName;
-       CopiedString m_path;
-       CopiedString m_name;
-       CopiedString m_type;
+       const std::string m_originalName;
+       std::string m_path;
+       std::string m_name;
+       std::string m_type;
        ModelLoader* m_loader;
        ModuleObservers m_observers;
        std::time_t m_modified;
        std::size_t m_unrealised;
 
-       ModelResource( const CopiedString& name ) :
+       ModelResource( const std::string& name ) :
                m_model( g_nullModel ),
                m_originalName( name ),
                m_type( path_get_extension( name.c_str() ) ),
@@ -508,7 +508,7 @@ struct ModelResource : public Resource
 
 class HashtableReferenceCache : public ReferenceCache, public ModuleObserver
 {
-typedef HashedCache<CopiedString, ModelResource, PathHash, PathEqual> ModelReferences;
+typedef HashedCache<std::string, ModelResource, PathHash, PathEqual> ModelReferences;
 ModelReferences m_references;
 std::size_t m_unrealised;
 
@@ -560,10 +560,10 @@ void clear(){
 
 Resource* capture( const char* path ){
        //globalOutputStream() << "capture: \"" << path << "\"\n";
-       return m_references.capture( CopiedString( path ) ).get();
+       return m_references.capture( std::string( path ) ).get();
 }
 void release( const char* path ){
-       m_references.release( CopiedString( path ) );
+       m_references.release( std::string( path ) );
        //globalOutputStream() << "release: \"" << path << "\"\n";
 }
 
index 0c274918c92096777ab57af1f3dbaa1f766efd10..1078eff5615e1c33dff347a9cdcc70656f739fba 100644 (file)
@@ -1014,7 +1014,7 @@ void detach( ModuleObserver& observer ){
        }
        m_observers.detach( observer );
 }
-void realise( const CopiedString& name ){
+void realise( const std::string& name ){
        construct( name.c_str() );
 
        if ( m_used != 0 && m_shader != 0 ) {
@@ -1147,7 +1147,7 @@ public:
 explicit CreateOpenGLShader( OpenGLShaderCache* cache = 0 )
        : m_cache( cache ){
 }
-OpenGLShader* construct( const CopiedString& name ){
+OpenGLShader* construct( const std::string& name ){
        OpenGLShader* shader = new OpenGLShader;
        if ( m_cache->realised() ) {
                shader->realise( name );
@@ -1162,7 +1162,7 @@ void destroy( OpenGLShader* shader ){
 }
 };
 
-typedef HashedCache<CopiedString, OpenGLShader, HashString, std::equal_to<CopiedString>, CreateOpenGLShader> Shaders;
+typedef HashedCache<std::string, OpenGLShader, HashString, std::equal_to<std::string>, CreateOpenGLShader> Shaders;
 Shaders m_shaders;
 std::size_t m_unrealised;
 
@@ -2010,7 +2010,7 @@ void OpenGLStateBucket::render( OpenGLState& current, unsigned int globalstate,
 
 class OpenGLStateMap : public OpenGLStateLibrary
 {
-typedef std::map<CopiedString, OpenGLState> States;
+typedef std::map<std::string, OpenGLState> States;
 States m_states;
 public:
 ~OpenGLStateMap(){
index 1904867b949c0eeec93aacf717a4853d975f022a..bca6baa7d6421ed0b82b2f7d9cab3d5db031c1dc 100644 (file)
@@ -32,8 +32,8 @@
 
 class RadiantModuleServer : public ModuleServer
 {
-typedef std::pair<CopiedString, int> ModuleType;
-typedef std::pair<ModuleType, CopiedString> ModuleKey;
+typedef std::pair<std::string, int> ModuleType;
+typedef std::pair<ModuleType, std::string> ModuleKey;
 typedef std::map<ModuleKey, Module*> Modules_;
 Modules_ m_modules;
 bool m_error;
index 73312a078fba5435b28649a9680e03ea31efe045..ddd0bfd5d4fb2275ffa3c9634cf851818cd320e7 100644 (file)
@@ -258,7 +258,7 @@ void SurfaceInspector_queueDraw(){
 
 namespace
 {
-CopiedString g_selectedShader;
+std::string g_selectedShader;
 TextureProjection g_selectedTexdef;
 ContentsFlagsValue g_selectedFlags;
 size_t g_selectedShaderSize[2];
@@ -312,7 +312,7 @@ void SurfaceInspector_SetCurrent_FromSelected(){
                        g_selectedTexdef.m_brushprimit_texdef.coords[0][2] = float_mod( g_selectedTexdef.m_brushprimit_texdef.coords[0][2], (float)g_selectedShaderSize[0] );
                        g_selectedTexdef.m_brushprimit_texdef.coords[1][2] = float_mod( g_selectedTexdef.m_brushprimit_texdef.coords[1][2], (float)g_selectedShaderSize[1] );
 
-                       CopiedString name;
+                       std::string name;
                        Scene_BrushGetShader_Component_Selected( GlobalSceneGraph(), name );
                        if ( string_not_empty( name.c_str() ) ) {
                                SurfaceInspector_SetSelectedShader( name.c_str() );
@@ -328,7 +328,7 @@ void SurfaceInspector_SetCurrent_FromSelected(){
                        Scene_BrushGetTexdef_Selected( GlobalSceneGraph(), projection );
                        SurfaceInspector_SetSelectedTexdef( projection );
 
-                       CopiedString name;
+                       std::string name;
                        Scene_BrushGetShader_Selected( GlobalSceneGraph(), name );
                        if ( string_empty( name.c_str() ) ) {
                                Scene_PatchGetShader_Selected( GlobalSceneGraph(), name );
@@ -1254,12 +1254,12 @@ void SurfaceInspector::ApplyFlags(){
 }
 
 
-void Face_getTexture( Face& face, CopiedString& shader, TextureProjection& projection, ContentsFlagsValue& flags ){
+void Face_getTexture( Face& face, std::string& shader, TextureProjection& projection, ContentsFlagsValue& flags ){
        shader = face.GetShader();
        face.GetTexdef( projection );
        flags = face.getShader().m_flags;
 }
-typedef Function4<Face&, CopiedString&, TextureProjection&, ContentsFlagsValue&, void, Face_getTexture> FaceGetTexture;
+typedef Function4<Face&, std::string&, TextureProjection&, ContentsFlagsValue&, void, Face_getTexture> FaceGetTexture;
 
 void Face_setTexture( Face& face, const char* shader, const TextureProjection& projection, const ContentsFlagsValue& flags ){
        face.SetShader( shader );
@@ -1269,12 +1269,12 @@ void Face_setTexture( Face& face, const char* shader, const TextureProjection& p
 typedef Function4<Face&, const char*, const TextureProjection&, const ContentsFlagsValue&, void, Face_setTexture> FaceSetTexture;
 
 
-void Patch_getTexture( Patch& patch, CopiedString& shader, TextureProjection& projection, ContentsFlagsValue& flags ){
+void Patch_getTexture( Patch& patch, std::string& shader, TextureProjection& projection, ContentsFlagsValue& flags ){
        shader = patch.GetShader();
        projection = TextureProjection( texdef_t(), brushprimit_texdef_t(), Vector3( 0, 0, 0 ), Vector3( 0, 0, 0 ) );
        flags = ContentsFlagsValue( 0, 0, 0, false );
 }
-typedef Function4<Patch&, CopiedString&, TextureProjection&, ContentsFlagsValue&, void, Patch_getTexture> PatchGetTexture;
+typedef Function4<Patch&, std::string&, TextureProjection&, ContentsFlagsValue&, void, Patch_getTexture> PatchGetTexture;
 
 void Patch_setTexture( Patch& patch, const char* shader, const TextureProjection& projection, const ContentsFlagsValue& flags ){
        patch.SetShader( shader );
@@ -1282,7 +1282,7 @@ void Patch_setTexture( Patch& patch, const char* shader, const TextureProjection
 typedef Function4<Patch&, const char*, const TextureProjection&, const ContentsFlagsValue&, void, Patch_setTexture> PatchSetTexture;
 
 
-typedef Callback3<CopiedString&, TextureProjection&, ContentsFlagsValue&> GetTextureCallback;
+typedef Callback3<std::string&, TextureProjection&, ContentsFlagsValue&> GetTextureCallback;
 typedef Callback3<const char*, const TextureProjection&, const ContentsFlagsValue&> SetTextureCallback;
 
 struct Texturable
@@ -1374,7 +1374,7 @@ Texturable Scene_getClosestTexturable( scene::Graph& graph, SelectionTest& test
        return texturable;
 }
 
-bool Scene_getClosestTexture( scene::Graph& graph, SelectionTest& test, CopiedString& shader, TextureProjection& projection, ContentsFlagsValue& flags ){
+bool Scene_getClosestTexture( scene::Graph& graph, SelectionTest& test, std::string& shader, TextureProjection& projection, ContentsFlagsValue& flags ){
        Texturable texturable = Scene_getClosestTexturable( graph, test );
        if ( texturable.getTexture != GetTextureCallback() ) {
                texturable.getTexture( shader, projection, flags );
@@ -1415,7 +1415,7 @@ void TextureBrowser_SetSelectedShader( TextureBrowser& textureBrowser, const cha
 const char* TextureBrowser_GetSelectedShader( TextureBrowser& textureBrowser );
 
 void Scene_copyClosestTexture( SelectionTest& test ){
-       CopiedString shader;
+       std::string shader;
        if ( Scene_getClosestTexture( GlobalSceneGraph(), test, shader, g_faceTextureClipboard.m_projection, g_faceTextureClipboard.m_flags ) ) {
                TextureBrowser_SetSelectedShader( g_TextureBrowser, shader.c_str() );
        }
index b223e2ee1318a87c40d0b7ccbab788f13a72f1c1..47200afdacfd97fea0c6d30a72bc2010ff10d87a 100644 (file)
@@ -321,7 +321,7 @@ class TestHashtable
 {
 public:
 TestHashtable(){
-       HashTable<CopiedString, CopiedString, HashStringNoCase, StringEqualNoCase> strings;
+       HashTable<std::string, std::string, HashStringNoCase, StringEqualNoCase> strings;
        strings["Monkey"] = "bleh";
        strings["MonkeY"] = "blah";
 }
@@ -331,7 +331,7 @@ const TestHashtable g_testhashtable;
 
 #endif
 
-typedef std::pair<LoadImageCallback, CopiedString> TextureKey;
+typedef std::pair<LoadImageCallback, std::string> TextureKey;
 
 void qtexture_realise( qtexture_t& texture, const TextureKey& key ){
        texture.texture_number = 0;
index 963f694d496082a068a163f39195e42ce5d6f4ef..cf3fa3bedaa999fd243cbf6224138e387dbd533b 100644 (file)
@@ -99,14 +99,14 @@ bool string_equal_start( const char* string, StringRange start ){
        return string_equal_n( string, start.first, start.last - start.first );
 }
 
-typedef std::set<CopiedString> TextureGroups;
+typedef std::set<std::string> TextureGroups;
 
 void TextureGroups_addWad( TextureGroups& groups, const char* archive ){
        if ( extension_equal( path_get_extension( archive ), "wad" ) ) {
 #if 1
                groups.insert( archive );
 #else
-               CopiedString archiveBaseName( path_get_filename_start( archive ), path_get_filename_base_end( archive ) );
+               std::string archiveBaseName( path_get_filename_start( archive ), path_get_filename_base_end( archive ) );
                groups.insert( archiveBaseName );
 #endif
        }
@@ -118,7 +118,7 @@ void TextureGroups_addShader( TextureGroups& groups, const char* shaderName ){
        if ( texture != shaderName ) {
                const char* last = path_remove_directory( texture );
                if ( !string_empty( last ) ) {
-                       groups.insert( CopiedString( StringRange( texture, --last ) ) );
+                       groups.insert( std::string( StringRange( texture, --last ) ) );
                }
        }
 }
@@ -214,7 +214,7 @@ int width, height;
 int originy;
 int m_nTotalHeight;
 
-CopiedString shader;
+std::string shader;
 
 GtkWindow* m_parent;
 GtkWidget* m_gl_widget;
@@ -232,10 +232,10 @@ GtkWidget* m_tag_notebook;
 GtkWidget* m_search_button;
 GtkWidget* m_shader_info_item;
 
-std::set<CopiedString> m_all_tags;
+std::set<std::string> m_all_tags;
 GtkListStore* m_all_tags_list;
-std::vector<CopiedString> m_copied_tags;
-std::set<CopiedString> m_found_shaders;
+std::vector<std::string> m_copied_tags;
+std::set<std::string> m_found_shaders;
 
 ToggleItem m_hideunused_item;
 ToggleItem m_showshaders_item;
@@ -382,7 +382,7 @@ void TextureBrowser_SetSelectedShader( TextureBrowser& textureBrowser, const cha
 
        // disable the menu item "shader info" if no shader was selected
        IShader* ishader = QERApp_Shader_ForName( shader );
-       CopiedString filename = ishader->getShaderFileName();
+       std::string filename = ishader->getShaderFileName();
 
        if ( filename.empty() ) {
                if ( textureBrowser.m_shader_info_item != NULL ) {
@@ -397,7 +397,7 @@ void TextureBrowser_SetSelectedShader( TextureBrowser& textureBrowser, const cha
 }
 
 
-CopiedString g_TextureBrowser_currentDirectory;
+std::string g_TextureBrowser_currentDirectory;
 
 /*
    ============================================================================
@@ -451,7 +451,7 @@ void Texture_NextPos( TextureBrowser& textureBrowser, TextureLayout& layout, qte
 }
 
 bool TextureSearch_IsShown( const char* name ){
-       std::set<CopiedString>::iterator iter;
+       std::set<std::string>::iterator iter;
 
        iter = GlobalTextureBrowser().m_found_shaders.find( name );
 
@@ -463,8 +463,8 @@ bool TextureSearch_IsShown( const char* name ){
        }
 }
 
-CopiedString g_notex;
-CopiedString g_shadernotex;
+std::string g_notex;
+std::string g_shadernotex;
 
 // if texture_showinuse jump over non in-use textures
 bool Texture_IsShown( IShader* shader, bool show_shaders, bool hideUnused ){
@@ -474,7 +474,7 @@ bool Texture_IsShown( IShader* shader, bool show_shaders, bool hideUnused ){
        }
 
        if ( g_TextureBrowser_currentDirectory == "Untagged" ) {
-               std::set<CopiedString>::iterator iter;
+               std::set<std::string>::iterator iter;
 
                iter = GlobalTextureBrowser().m_found_shaders.find( shader->getName() );
 
@@ -677,7 +677,7 @@ class LoadShaderVisitor : public Archive::Visitor
 {
 public:
 void visit( const char* name ){
-       IShader* shader = QERApp_Shader_ForName( CopiedString( StringRange( name, path_get_filename_base_end( name ) ) ).c_str() );
+       IShader* shader = QERApp_Shader_ForName( std::string( StringRange( name, path_get_filename_base_end( name ) ) ).c_str() );
        shader->DecRef();
 }
 };
@@ -1242,7 +1242,7 @@ void BuildStoreAssignedTags( GtkListStore* store, const char* shader, TextureBro
 
        gtk_list_store_clear( store );
 
-       std::vector<CopiedString> assigned_tags;
+       std::vector<std::string> assigned_tags;
        TagBuilder.GetShaderTags( shader, assigned_tags );
 
        for ( size_t i = 0; i < assigned_tags.size(); i++ )
@@ -1254,11 +1254,11 @@ void BuildStoreAssignedTags( GtkListStore* store, const char* shader, TextureBro
 
 void BuildStoreAvailableTags(   GtkListStore* storeAvailable,
                                                                GtkListStore* storeAssigned,
-                                                               const std::set<CopiedString>& allTags,
+                                                               const std::set<std::string>& allTags,
                                                                TextureBrowser* textureBrowser ){
        GtkTreeIter iterAssigned;
        GtkTreeIter iterAvailable;
-       std::set<CopiedString>::const_iterator iterAll;
+       std::set<std::string>::const_iterator iterAll;
        gchar* tag_assigned;
 
        gtk_list_store_clear( storeAvailable );
@@ -1441,7 +1441,7 @@ void TextureGroups_constructTreeModel( TextureGroups groups, GtkTreeStore* store
                         && next != groups.end()
                         && string_equal_start( ( *next ).c_str(), dirRoot ) ) {
                        gtk_tree_store_append( store, &iter, NULL );
-                       gtk_tree_store_set( store, &iter, 0, CopiedString( StringRange( dirName, firstUnderscore ) ).c_str(), -1 );
+                       gtk_tree_store_set( store, &iter, 0, std::string( StringRange( dirName, firstUnderscore ) ).c_str(), -1 );
 
                        // keep going...
                        while ( i != groups.end() && string_equal_start( ( *i ).c_str(), dirRoot ) )
@@ -1483,7 +1483,7 @@ void TextureBrowser_constructTreeStore(){
        TextureGroups groups = TextureGroups_constructTreeView();
        GtkTreeStore* store = gtk_tree_store_new( 1, G_TYPE_STRING );
        TextureGroups_constructTreeModel( groups, store );
-       std::set<CopiedString>::iterator iter;
+       std::set<std::string>::iterator iter;
 
        GtkTreeModel* model = GTK_TREE_MODEL( store );
 
@@ -1705,7 +1705,7 @@ void TextureBrowser_assignTags(){
                                        if ( !TagBuilder.CheckShaderTag( g_TextureBrowser.shader.c_str() ) ) {
                                                // create a custom shader/texture entry
                                                IShader* ishader = QERApp_Shader_ForName( g_TextureBrowser.shader.c_str() );
-                                               CopiedString filename = ishader->getShaderFileName();
+                                               std::string filename = ishader->getShaderFileName();
 
                                                if ( filename.empty() ) {
                                                        // it's a texture
@@ -1774,7 +1774,7 @@ void TextureBrowser_buildTagList(){
        GtkTreeIter treeIter;
        gtk_list_store_clear( g_TextureBrowser.m_all_tags_list );
 
-       std::set<CopiedString>::iterator iter;
+       std::set<std::string>::iterator iter;
 
        for ( iter = g_TextureBrowser.m_all_tags.begin(); iter != g_TextureBrowser.m_all_tags.end(); ++iter )
        {
@@ -1831,7 +1831,7 @@ void TextureBrowser_searchTags(){
                        globalOutputStream() << "Found " << (unsigned int)shaders_found << " textures and shaders with " << tags_searched << "\n";
                        ScopeDisableScreenUpdates disableScreenUpdates( "Searching...", "Loading Textures" );
 
-                       std::set<CopiedString>::iterator iter;
+                       std::set<std::string>::iterator iter;
 
                        for ( iter = g_TextureBrowser.m_found_shaders.begin(); iter != g_TextureBrowser.m_found_shaders.end(); iter++ )
                        {
@@ -1889,7 +1889,7 @@ void TextureBrowser_constructSearchButton(){
 
 void TextureBrowser_checkTagFile(){
        const char SHADERTAG_FILE[] = "shadertags.xml";
-       CopiedString default_filename, rc_filename;
+       std::string default_filename, rc_filename;
        StringOutputStream stream( 256 );
 
        stream << LocalRcPath_get();
@@ -2204,7 +2204,7 @@ void TextureBrowser_shaderInfo(){
 }
 
 void TextureBrowser_addTag(){
-       CopiedString tag;
+       std::string tag;
 
        EMessageBoxReturn result = DoShaderTagDlg( &tag, "Add shader tag" );
 
@@ -2237,7 +2237,7 @@ void TextureBrowser_renameTag(){
        gtk_tree_selection_selected_foreach( selection, GtkTreeSelectionForeachFunc( TextureBrowser_selectionHelper ), &selected );
 
        if ( g_slist_length( selected ) == 1 ) { // we only rename a single tag
-               CopiedString newTag;
+               std::string newTag;
                EMessageBoxReturn result = DoShaderTagDlg( &newTag, "Rename shader tag" );
 
                if ( result == eIDOK && !newTag.empty() ) {
@@ -2259,7 +2259,7 @@ void TextureBrowser_renameTag(){
 
                        TagBuilder.RenameShaderTag( oldTag, newTag.c_str() );
 
-                       g_TextureBrowser.m_all_tags.erase( (CopiedString)oldTag );
+                       g_TextureBrowser.m_all_tags.erase( (std::string)oldTag );
                        g_TextureBrowser.m_all_tags.insert( newTag );
 
                        BuildStoreAssignedTags( g_TextureBrowser.m_assigned_store, g_TextureBrowser.shader.c_str(), &g_TextureBrowser );
@@ -2301,7 +2301,7 @@ void TextureBrowser_deleteTag(){
                        }
 
                        TagBuilder.DeleteTag( tagSelected );
-                       g_TextureBrowser.m_all_tags.erase( (CopiedString)tagSelected );
+                       g_TextureBrowser.m_all_tags.erase( (std::string)tagSelected );
 
                        BuildStoreAssignedTags( g_TextureBrowser.m_assigned_store, g_TextureBrowser.shader.c_str(), &g_TextureBrowser );
                        BuildStoreAvailableTags( g_TextureBrowser.m_available_store, g_TextureBrowser.m_assigned_store, g_TextureBrowser.m_all_tags, &g_TextureBrowser );
@@ -2319,10 +2319,10 @@ void TextureBrowser_copyTag(){
 
 void TextureBrowser_pasteTag(){
        IShader* ishader = QERApp_Shader_ForName( g_TextureBrowser.shader.c_str() );
-       CopiedString shader = g_TextureBrowser.shader.c_str();
+       std::string shader = g_TextureBrowser.shader.c_str();
 
        if ( !TagBuilder.CheckShaderTag( shader.c_str() ) ) {
-               CopiedString shaderFile = ishader->getShaderFileName();
+               std::string shaderFile = ishader->getShaderFileName();
                if ( shaderFile.empty() ) {
                        // it's a texture
                        TagBuilder.AddShaderNode( shader.c_str(), CUSTOM, TEXTURE );
@@ -2405,7 +2405,7 @@ void TextureBrowser_showUntagged(){
        if ( result == eIDYES ) {
                g_TextureBrowser.m_found_shaders.clear();
                TagBuilder.GetUntagged( g_TextureBrowser.m_found_shaders );
-               std::set<CopiedString>::iterator iter;
+               std::set<std::string>::iterator iter;
 
                ScopeDisableScreenUpdates disableScreenUpdates( "Searching untagged textures...", "Loading Textures" );
 
index 4d2f82384d8e62415ca44f9ac41644701bf063d6..ebd68d66eaba9e916c0380d9281e0e2b6809fd5e 100644 (file)
@@ -737,7 +737,7 @@ void graph_tree_model_row_changed( GraphTreeNode& node );
 
 class GraphTreeNode
 {
-typedef std::map<std::pair<CopiedString, scene::Node*>, GraphTreeNode*> ChildNodes;
+typedef std::map<std::pair<std::string, scene::Node*>, GraphTreeNode*> ChildNodes;
 ChildNodes m_childnodes;
 public:
 Reference<scene::Instance> m_instance;
index c12811b9b74426119b4bdaaaa8116d0adacdecd5..1298b6cc1d311db8afa8b0f729f7f99eaf808fee 100644 (file)
@@ -110,7 +110,7 @@ void release(){
 struct Operation
 {
        Snapshot m_snapshot;
-       CopiedString m_command;
+       std::string m_command;
 
        Operation( const char* command )
                : m_command( command ){
index 61f3c4783aa2277729abba2857167df5b90f4c3e..b76e91782c4962df140070ee57e784cfc071c868 100644 (file)
@@ -1084,10 +1084,10 @@ void EntityClassMenu_addItem( GtkMenu* menu, const char* name ){
 
 class EntityClassMenuInserter : public EntityClassVisitor
 {
-typedef std::pair<GtkMenu*, CopiedString> MenuPair;
+typedef std::pair<GtkMenu*, std::string> MenuPair;
 typedef std::vector<MenuPair> MenuStack;
 MenuStack m_stack;
-CopiedString m_previous;
+std::string m_previous;
 public:
 EntityClassMenuInserter( GtkMenu* menu ){
        m_stack.reserve( 2 );
@@ -1105,7 +1105,7 @@ void visit( EntityClass* e ){
        }
        m_previous = e->name();
 }
-void pushMenu( const CopiedString& name ){
+void pushMenu( const std::string& name ){
        GtkMenuItem* item = GTK_MENU_ITEM( gtk_menu_item_new_with_label( name.c_str() ) );
        gtk_widget_show( GTK_WIDGET( item ) );
        container_add_widget( GTK_CONTAINER( m_stack.back().first ), GTK_WIDGET( item ) );
@@ -1133,7 +1133,7 @@ void addItem( const char* name, const char* next ){
                        if ( m_stack.size() == 2 ) {
                                popMenu();
                        }
-                       pushMenu( CopiedString( StringRange( name, underscore ) ) );
+                       pushMenu( std::string( StringRange( name, underscore ) ) );
                }
                else if ( m_stack.size() == 2 ) {
                        popMenu();