summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-01-08 14:29:55 +0200
committerNoel Grandin <noel@peralex.com>2014-01-09 10:59:58 +0200
commit6d25220ad6c869bb7cd79cf678d092b81558a8d2 (patch)
tree84bbb32ef5233d5a162eb4f3073de96ca8dc1d13 /sot
parentf85b2f676dabd388254fb411d497e36ccecd2ddb (diff)
remove unnecessary use of OUString*
in FileList. There no benefit in storing a ref-counted value class like OUString by pointer in a std::vector. Change-Id: I302bc460de67c7fe324d745f3225df4e17195486
Diffstat (limited to 'sot')
-rw-r--r--sot/source/base/filelist.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sot/source/base/filelist.cxx b/sot/source/base/filelist.cxx
index da4cd9f446a1..4493fcf129ed 100644
--- a/sot/source/base/filelist.cxx
+++ b/sot/source/base/filelist.cxx
@@ -39,8 +39,6 @@ FileList::~FileList()
void FileList::ClearAll( void )
{
- for ( size_t i = 0, n = aStrList.size(); i < n; ++i )
- delete aStrList[ i ];
aStrList.clear();
}
@@ -53,7 +51,7 @@ void FileList::ClearAll( void )
FileList& FileList::operator=( const FileList& rFileList )
{
for ( size_t i = 0, n = rFileList.aStrList.size(); i < n; ++i )
- aStrList.push_back( new OUString( *rFileList.aStrList[ i ] ) );
+ aStrList.push_back( rFileList.aStrList[ i ] );
return *this;
}
@@ -137,14 +135,14 @@ SvStream& operator>>( SvStream& rIStm, FileList& rFileList )
void FileList::AppendFile( const OUString& rStr )
{
- aStrList.push_back( new OUString( rStr ) );
+ aStrList.push_back( rStr );
}
OUString FileList::GetFile( size_t i ) const
{
OUString aStr;
if( i < aStrList.size() )
- aStr = *aStrList[ i ];
+ aStr = aStrList[ i ];
return aStr;
}