From b14224fe97b8a44232c9c1401d3a49771f46582e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 2 Feb 2016 16:15:51 +0200 Subject: loplugin:unusedmethods using an idea from 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... dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- sc/inc/address.hxx | 31 ------------------------------- sc/inc/bigrange.hxx | 2 -- sc/inc/chartpos.hxx | 2 -- 3 files changed, 35 deletions(-) (limited to 'sc/inc') diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx index 9853a40157d4..78498537e4fd 100644 --- a/sc/inc/address.hxx +++ b/sc/inc/address.hxx @@ -319,8 +319,6 @@ public: inline bool operator!=( const ScAddress& rAddress ) const; inline bool operator<( const ScAddress& rAddress ) const; inline bool operator<=( const ScAddress& rAddress ) const; - inline bool operator>( const ScAddress& rAddress ) const; - inline bool operator>=( const ScAddress& rAddress ) const; inline size_t hash() const; @@ -396,16 +394,6 @@ inline bool ScAddress::operator<=( const ScAddress& rAddress ) const return operator<( rAddress ) || operator==( rAddress ); } -inline bool ScAddress::operator>( const ScAddress& rAddress ) const -{ - return !operator<=( rAddress ); -} - -inline bool ScAddress::operator>=( const ScAddress& rAddress ) const -{ - return !operator<( rAddress ); -} - inline size_t ScAddress::hash() const { // Assume that there are not that many addresses with row > 2^16 AND column @@ -572,8 +560,6 @@ public: inline bool operator!=( const ScRange& rRange ) const; inline bool operator<( const ScRange& rRange ) const; inline bool operator<=( const ScRange& rRange ) const; - inline bool operator>( const ScRange& rRange ) const; - inline bool operator>=( const ScRange& rRange ) const; /// Hash 2D area ignoring table number. inline size_t hashArea() const; @@ -621,16 +607,6 @@ inline bool ScRange::operator<=( const ScRange& rRange ) const return operator<( rRange ) || operator==( rRange ); } -inline bool ScRange::operator>( const ScRange& rRange ) const -{ - return !operator<=( rRange ); -} - -inline bool ScRange::operator>=( const ScRange& rRange ) const -{ - return !operator<( rRange ); -} - inline bool ScRange::In( const ScAddress& rAddress ) const { return @@ -708,7 +684,6 @@ public: { return aRange[n]; } - inline bool operator==( const ScRangePair& ) const; }; inline ScRangePair& ScRangePair::operator= ( const ScRangePair& rRange ) @@ -718,12 +693,6 @@ inline ScRangePair& ScRangePair::operator= ( const ScRangePair& rRange ) return *this; } -inline bool ScRangePair::operator==( const ScRangePair& rRange ) const -{ - return (aRange[0] == rRange.aRange[0]) && - (aRange[1] == rRange.aRange[1]); -} - // ScRefAddress class ScRefAddress { diff --git a/sc/inc/bigrange.hxx b/sc/inc/bigrange.hxx index c677df19aa4a..9dfbe2e073df 100644 --- a/sc/inc/bigrange.hxx +++ b/sc/inc/bigrange.hxx @@ -69,8 +69,6 @@ public: { nCol = r.Col(); nRow = r.Row(); nTab = r.Tab(); return *this; } bool operator==( const ScBigAddress& r ) const { return nCol == r.nCol && nRow == r.nRow && nTab == r.nTab; } - bool operator!=( const ScBigAddress& r ) const - { return !operator==( r ); } }; inline void ScBigAddress::PutInOrder( ScBigAddress& r ) diff --git a/sc/inc/chartpos.hxx b/sc/inc/chartpos.hxx index 75e2e14bcadc..7bf2e556cfc9 100644 --- a/sc/inc/chartpos.hxx +++ b/sc/inc/chartpos.hxx @@ -133,8 +133,6 @@ public: bool HasColHeaders() const { return bColHeaders; } bool HasRowHeaders() const { return bRowHeaders; } - bool operator==(const ScChartPositioner& rCmp) const; - void InvalidateGlue() { eGlue = SC_CHARTGLUE_NA; -- cgit