diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-20 12:41:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-20 15:09:20 +0200 |
commit | 85f08e3e34bea01456eaf8989ac4f77d3900d5c5 (patch) | |
tree | ed03d7dcb54d1c691aec047710c5e52218aeb23d /include/toolkit/controls/eventcontainer.hxx | |
parent | b1601f7333181a04583612ac3b73e68bd7842c88 (diff) |
remove some "optimisation" insanity in ScriptEventContainer
I can only imagine the weird bugs that must have periodically resulted
when we had a hash value collision.
In the process, fix hasElements() to return a useful value
Change-Id: I1d9a052e73332b4b2bbc9c1fd8142c13eb22f1be
Reviewed-on: https://gerrit.libreoffice.org/40226
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/toolkit/controls/eventcontainer.hxx')
-rw-r--r-- | include/toolkit/controls/eventcontainer.hxx | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/include/toolkit/controls/eventcontainer.hxx b/include/toolkit/controls/eventcontainer.hxx index aba5ce9f3aa4..859b06ee45a3 100644 --- a/include/toolkit/controls/eventcontainer.hxx +++ b/include/toolkit/controls/eventcontainer.hxx @@ -32,24 +32,12 @@ namespace toolkit { -// Hashtable to optimize -typedef std::unordered_map -< - OUString, - sal_Int32, - OUStringHash -> -NameContainerNameMap; - - class ScriptEventContainer : public ::cppu::WeakImplHelper< css::container::XNameContainer, css::container::XContainer > { - NameContainerNameMap mHashMap; - css::uno::Sequence< OUString > mNames; - std::vector< css::uno::Any > mValues; - sal_Int32 mnElementCount; + std::unordered_map< OUString, css::uno::Any, OUStringHash> + mHashMap; css::uno::Type mType; ContainerListenerMultiplexer maContainerListeners; |