diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-24 09:08:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-11 13:25:31 +0100 |
commit | 0d1253c2328106a443d16b6c8e96347de33e2ace (patch) | |
tree | e26e7ca9f9b91f50573f446b8a93515f4c4302eb /sc/source/core | |
parent | 2dd7aba7564a222c2acbac22975a76a6ab33c41f (diff) |
new loplugin writeonlyvars
largely based on the relevant portion of the unusedfields loplugin, but
adapted for local vars
Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1
Reviewed-on: https://gerrit.libreoffice.org/66835
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/core')
-rw-r--r-- | sc/source/core/data/documen2.cxx | 3 | ||||
-rw-r--r-- | sc/source/core/data/table3.cxx | 4 |
2 files changed, 1 insertions, 6 deletions
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index a97dbc389a90..d2395cdbb0fb 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -1241,7 +1241,6 @@ void ScDocument::GetCellChangeTrackNote( const ScAddress &aCellPos, OUString &aT const ScChangeAction* pFound = nullptr; const ScChangeAction* pFoundContent = nullptr; const ScChangeAction* pFoundMove = nullptr; - long nModified = 0; const ScChangeAction* pAction = pTrack->GetFirst(); while (pAction) { @@ -1271,7 +1270,6 @@ void ScDocument::GetCellChangeTrackNote( const ScAddress &aCellPos, OUString &aT default: break; } - ++nModified; } } if ( eType == SC_CAT_MOVE ) @@ -1282,7 +1280,6 @@ void ScDocument::GetCellChangeTrackNote( const ScAddress &aCellPos, OUString &aT if ( aRange.In( aCellPos ) ) { pFound = pAction; - ++nModified; } } } diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 0b5e07497a27..eb2d1d9c4857 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -3133,9 +3133,7 @@ SCSIZE ScTable::Query(const ScQueryParam& rParamOrg, bool bKeepSub) aStr = aBuf.makeStringAndClear(); } - std::pair<StrSetType::iterator, bool> r = aStrSet.insert(aStr); - bool bIsUnique = r.second; // unique if inserted. - bResult = bIsUnique; + bResult = aStrSet.insert(aStr).second; // unique if inserted. } } else |