[Libreoffice-commits] core.git: include/sot sot/source

Caolán McNamara caolanm at redhat.com
Mon Jan 9 12:19:09 UTC 2017


 include/sot/filelist.hxx     |   11 +++--------
 sot/source/base/filelist.cxx |   31 +------------------------------
 2 files changed, 4 insertions(+), 38 deletions(-)

New commits:
commit ea86f1ca5c627da45da49e20f27ef112febc41e8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 9 12:02:28 2017 +0000

    defaults are good enough
    
    and protected isn't necessary
    
    Change-Id: I6219632fe1da36d484864c2500e9ac14978f2cb8

diff --git a/include/sot/filelist.hxx b/include/sot/filelist.hxx
index 1939f71..e12fb36 100644
--- a/include/sot/filelist.hxx
+++ b/include/sot/filelist.hxx
@@ -27,19 +27,14 @@
 
 class SOT_DLLPUBLIC FileList
 {
-    ::std::vector< OUString >  aStrList;
+    std::vector< OUString >  aStrList;
 
-protected:
+private:
 
     // Liste loeschen;
-    void            ClearAll();
+    void clear() { aStrList.clear(); }
 
 public:
-    FileList() {};
-    ~FileList();
-
-    // Zuweisungsoperator
-    FileList&           operator=( const FileList& rFileList );
 
     // Im-/Export
     SOT_DLLPUBLIC friend SvStream&  ReadFileList( SvStream& rIStm, FileList& rFileList );
diff --git a/sot/source/base/filelist.cxx b/sot/source/base/filelist.cxx
index b22e2c6..8760d7a 100644
--- a/sot/source/base/filelist.cxx
+++ b/sot/source/base/filelist.cxx
@@ -24,35 +24,6 @@
 #include <osl/diagnose.h>
 #include <osl/thread.h>
 
-/*************************************************************************
-|*
-|*    FileList - Ctor/Dtor
-|*
-\*************************************************************************/
-
-FileList::~FileList()
-{
-    ClearAll();
-}
-
-void FileList::ClearAll()
-{
-    aStrList.clear();
-}
-
-/*************************************************************************
-|*
-|*    FileList - Zuweisungsoperator
-|*
-\*************************************************************************/
-
-FileList& FileList::operator=( const FileList& rFileList )
-{
-    for (const auto & i : rFileList.aStrList)
-        aStrList.push_back( i );
-    return *this;
-}
-
 /******************************************************************************
 |*
 |*  Stream-Operatoren
@@ -67,7 +38,7 @@ FileList& FileList::operator=( const FileList& rFileList )
    resolved by the Windows clipboard bridge.*/
 SvStream& ReadFileList( SvStream& rIStm, FileList& rFileList )
 {
-    rFileList.ClearAll();
+    rFileList.clear();
 
     OUStringBuffer sBuf(512);
     sal_uInt16 c;


More information about the Libreoffice-commits mailing list