diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-02 16:15:51 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-02-08 06:08:14 +0000 |
commit | b14224fe97b8a44232c9c1401d3a49771f46582e (patch) | |
tree | 8f9cf31cf4b51a0edbb43022499a6acd17d0945d /tools | |
parent | c474e610e453d0f38f7cc6cb9559ad7e7b5d69ca (diff) |
loplugin:unusedmethods
using an idea from dtardon:
<dtardon> noelgrandin, hi. could you try to run the unusedmethods clang
plugin with "make build-nocheck"? that would catch functions that are
only used in tests. e.g., i just removed the whole o3tl::range class,
which has not been used in many years, but htere was a test for it...
<noelgrandin> dtardon, interesting idea! Sure, I can do that.
Change-Id: I5653953a426a2186a1e43017212d87ffce520387
Reviewed-on: https://gerrit.libreoffice.org/22041
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qa/cppunit/test_stream.cxx | 12 | ||||
-rw-r--r-- | tools/source/datetime/tdate.cxx | 14 | ||||
-rw-r--r-- | tools/source/fsys/urlobj.cxx | 45 | ||||
-rw-r--r-- | tools/source/generic/svborder.cxx | 13 | ||||
-rw-r--r-- | tools/source/memtools/multisel.cxx | 13 |
5 files changed, 0 insertions, 97 deletions
diff --git a/tools/qa/cppunit/test_stream.cxx b/tools/qa/cppunit/test_stream.cxx index 6704548a92d2..71981ae70df4 100644 --- a/tools/qa/cppunit/test_stream.cxx +++ b/tools/qa/cppunit/test_stream.cxx @@ -196,18 +196,6 @@ namespace CPPUNIT_ASSERT(aMemStream.good()); CPPUNIT_ASSERT(!aMemStream.bad()); CPPUNIT_ASSERT(!aMemStream.eof()); - - aMemStream.SetEndian(SvStreamEndian::LITTLE); - aMemStream.Seek(0); - foo[0] = 3; - foo[1] = 0; - foo[2] = 0; - foo[3] = 0; - aFoo = read_uInt32_lenPrefixed_uInt8s_ToOString(aMemStream); - CPPUNIT_ASSERT(aFoo == "bar"); - CPPUNIT_ASSERT(aMemStream.good()); - CPPUNIT_ASSERT(!aMemStream.bad()); - CPPUNIT_ASSERT(!aMemStream.eof()); } void Test::test_readline() diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx index 54985ec553c7..e8798b798e45 100644 --- a/tools/source/datetime/tdate.cxx +++ b/tools/source/datetime/tdate.cxx @@ -437,20 +437,6 @@ Date& Date::operator --() return *this; } -Date Date::operator ++( int ) -{ - Date aOldDate = *this; - Date::operator++(); - return aOldDate; -} - -Date Date::operator --( int ) -{ - Date aOldDate = *this; - Date::operator--(); - return aOldDate; -} - Date operator +( const Date& rDate, long nDays ) { Date aDate( rDate ); diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index 361e88d74a77..6ebb517540ae 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -3695,51 +3695,6 @@ bool INetURLObject::operator ==(INetURLObject const & rObject) const } } -bool INetURLObject::operator <(INetURLObject const & rObject) const -{ - sal_Int32 nCompare = m_aScheme.compare( - rObject.m_aScheme, m_aAbsURIRef, rObject.m_aAbsURIRef); - if (nCompare < 0) { - return true; - } else if (nCompare > 0) { - return false; - } - sal_uInt32 nPort1 = GetPort(); - sal_uInt32 nPort2 = rObject.GetPort(); - if (nPort1 < nPort2) - return true; - else if (nPort1 > nPort2) - return false; - nCompare = GetUser(NO_DECODE).compareTo(rObject.GetUser(NO_DECODE)); - if (nCompare < 0) - return true; - else if (nCompare > 0) - return false; - nCompare = GetPass(NO_DECODE).compareTo(rObject.GetPass(NO_DECODE)); - if (nCompare < 0) - return true; - else if (nCompare > 0) - return false; - nCompare = GetHost(NO_DECODE).compareTo(rObject.GetHost(NO_DECODE)); - if (nCompare < 0) - return true; - else if (nCompare > 0) - return false; - const OUString &rPath1(GetURLPath(NO_DECODE)); - const OUString &rPath2(rObject.GetURLPath(NO_DECODE)); - nCompare = rPath1.compareTo(rPath2); - if (nCompare < 0) - return true; - else if (nCompare > 0) - return false; - nCompare = GetParam(NO_DECODE).compareTo(rObject.GetParam(NO_DECODE)); - if (nCompare < 0) - return true; - else if (nCompare > 0) - return false; - return GetMsgId(NO_DECODE).compareTo(INetURLObject::GetMsgId(NO_DECODE)) < 0; -} - bool INetURLObject::ConcatData(INetProtocol eTheScheme, OUString const & rTheUser, OUString const & rThePassword, diff --git a/tools/source/generic/svborder.cxx b/tools/source/generic/svborder.cxx index a905b2c34ba9..8f2bec386c5e 100644 --- a/tools/source/generic/svborder.cxx +++ b/tools/source/generic/svborder.cxx @@ -32,17 +32,4 @@ Rectangle & operator += ( Rectangle & rRect, const SvBorder & rBorder ) return rRect; } -Rectangle & operator -= ( Rectangle & rRect, const SvBorder & rBorder ) -{ - // call GetSize first due to Empty-Rect - Size aS( rRect.GetSize() ); - aS.Width() -= rBorder.Left() + rBorder.Right(); - aS.Height() -= rBorder.Top() + rBorder.Bottom(); - - rRect.Left() += rBorder.Left(); - rRect.Top() += rBorder.Top(); - rRect.SetSize( aS ); - return rRect; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx index 3fdf5d520934..61a44b1bfce3 100644 --- a/tools/source/memtools/multisel.cxx +++ b/tools/source/memtools/multisel.cxx @@ -133,19 +133,6 @@ MultiSelection& MultiSelection::operator= ( const MultiSelection& rOrig ) return *this; } -bool MultiSelection::operator== ( MultiSelection& rWith ) -{ - if ( aTotRange != rWith.aTotRange || nSelCount != rWith.nSelCount || - aSels.size() != rWith.aSels.size() ) - return false; - - // compare the sub selections - for ( size_t n = 0; n < aSels.size(); ++n ) - if ( *aSels[ n ] != *rWith.aSels[ n ] ) - return false; - return true; -} - void MultiSelection::SelectAll( bool bSelect ) { ImplClear(); |