diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-26 11:14:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-26 12:25:56 +0200 |
commit | 98782932280d20ece450fa06a90c202fb8e2a26e (patch) | |
tree | f8092cc2c86641468a0edd77ca85bb4877b965f0 /tools | |
parent | f2964b9cdb04595e842de329222ffa2b63e5d7f7 (diff) |
loplugin:unusedmethods
Change-Id: I7f26ee112ed89ee3e69c56930260565f66ff145b
Reviewed-on: https://gerrit.libreoffice.org/40442
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/memtools/unqidx.cxx | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/tools/source/memtools/unqidx.cxx b/tools/source/memtools/unqidx.cxx index 06cda449a9c5..0ad58921efb2 100644 --- a/tools/source/memtools/unqidx.cxx +++ b/tools/source/memtools/unqidx.cxx @@ -37,25 +37,6 @@ UniqueIndexImpl::Index UniqueIndexImpl::Insert( void* p ) return nUniqIndex++; } -void* UniqueIndexImpl::Remove( Index nIndex ) -{ - std::map<Index, void*>::iterator it = maMap.find( nIndex ); - if ( it != maMap.end() ) - { - // Allow to recycle freed indexes, as was done by - // original implementation based on a vector - // This is not really needed when using a map, and - // really unique indexes might be better/safer? - if ( nIndex < nUniqIndex ) - nUniqIndex = nIndex; - - void* p = it->second; - maMap.erase( it ); - return p; - } - return nullptr; -} - void* UniqueIndexImpl::Get( Index nIndex ) const { std::map<Index, void*>::const_iterator it = maMap.find( nIndex ); @@ -64,12 +45,4 @@ void* UniqueIndexImpl::Get( Index nIndex ) const return nullptr; } -UniqueIndexImpl::Index UniqueIndexImpl::GetIndexOf(void const * p) const -{ - for( std::map<Index, void*>::const_iterator it = maMap.begin(); it != maMap.end(); ++it ) - if( it->second == p ) - return it->first; - return IndexNotFound; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |