diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2014-10-13 21:05:31 +0900 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-14 16:31:16 +0000 |
commit | 4e3772b1b472636b381ed511dcfff216fbe55d37 (patch) | |
tree | 3b505938ec8cbde22a924e88e44ae778b50afdfa /include/tools/unqidx.hxx | |
parent | 60126254eba8a6a6b94c60b2101ee90986161e24 (diff) |
fdo#75757: remove inheritance to std::map
from UniqueIndexImpl.
Change-Id: Iaa9040dff117ed5b05955c9f6eef31878dccf3b0
Reviewed-on: https://gerrit.libreoffice.org/11951
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/tools/unqidx.hxx')
-rw-r--r-- | include/tools/unqidx.hxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/tools/unqidx.hxx b/include/tools/unqidx.hxx index 9042476961ce..27de75f26515 100644 --- a/include/tools/unqidx.hxx +++ b/include/tools/unqidx.hxx @@ -25,18 +25,21 @@ #define UNIQUEINDEX_ENTRY_NOTFOUND CONTAINER_ENTRY_NOTFOUND -class TOOLS_DLLPUBLIC SAL_WARN_UNUSED UniqueIndexImpl : public std::map<sal_uInt32, void*> +class TOOLS_DLLPUBLIC SAL_WARN_UNUSED UniqueIndexImpl { private: + std::map<sal_uInt32, void*> maMap; sal_uIntPtr nStartIndex; sal_uIntPtr nUniqIndex; sal_uIntPtr nCount; public: UniqueIndexImpl( sal_uIntPtr _nStartIndex = 0 ) - : std::map<sal_uInt32, void*>(), + : maMap(), nStartIndex(_nStartIndex), nUniqIndex(_nStartIndex), nCount(0) {} + size_t size() const { return maMap.size(); } + sal_uIntPtr Insert( void* p ); // insert value with key, replacing existing entry if necessary void Insert( sal_uIntPtr aIndex, void* p ); |