summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-29 15:06:16 +0200
committerCaolán McNamara <caolanm@redhat.com>2016-01-31 17:26:49 +0000
commitbf86287c5f439c4873e8e7d191449ef40dee5795 (patch)
treea56558210e1e04ee650486481364f946369e505c /vcl
parent1fd280f2c63cdf8d24b48c02fe384f0bc20682c1 (diff)
move boost header dependency for ControlCacheHashFunction inside vcl
ControlCacheHashFunction is only used by vcl/opengl/* Change-Id: Id3aef4fc1ffc909a24a9cce0b86c5dc82e6e6612 Reviewed-on: https://gerrit.libreoffice.org/21900 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/svdata.hxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 0856d3232d14..a0663b11e3de 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -34,6 +34,7 @@
#include "xconnection.hxx"
#include <unordered_map>
+#include <boost/functional/hash.hpp>
struct ImplTimerData;
struct ImplIdleData;
@@ -399,6 +400,20 @@ struct ImplSVEvent
bool mbCall;
};
+struct ControlCacheHashFunction
+{
+ std::size_t operator()(ControlCacheKey const& aCache) const
+ {
+ std::size_t seed = 0;
+ boost::hash_combine(seed, aCache.mnType);
+ boost::hash_combine(seed, aCache.mnPart);
+ boost::hash_combine(seed, aCache.mnState);
+ boost::hash_combine(seed, aCache.maSize.Width());
+ boost::hash_combine(seed, aCache.maSize.Height());
+ return seed;
+ }
+};
+
#endif // INCLUDED_VCL_INC_SVDATA_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */