Kaydet (Commit) bf86287c authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Caolán McNamara

move boost header dependency for ControlCacheHashFunction inside vcl

ControlCacheHashFunction is only used by vcl/opengl/*

Change-Id: Id3aef4fc1ffc909a24a9cce0b86c5dc82e6e6612
Reviewed-on: https://gerrit.libreoffice.org/21900Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 1fd280f2
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
#include <tools/gen.hxx> #include <tools/gen.hxx>
#include <o3tl/typed_flags_set.hxx> #include <o3tl/typed_flags_set.hxx>
#include <boost/functional/hash.hpp>
/* Control Types: /* Control Types:
* *
* Specify the overall, whole control * Specify the overall, whole control
...@@ -302,21 +300,6 @@ public: ...@@ -302,21 +300,6 @@ public:
} }
}; };
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;
}
};
/* ButtonValue: /* ButtonValue:
* *
* Identifies the tri-state value options * Identifies the tri-state value options
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "xconnection.hxx" #include "xconnection.hxx"
#include <unordered_map> #include <unordered_map>
#include <boost/functional/hash.hpp>
struct ImplTimerData; struct ImplTimerData;
struct ImplIdleData; struct ImplIdleData;
...@@ -399,6 +400,20 @@ struct ImplSVEvent ...@@ -399,6 +400,20 @@ struct ImplSVEvent
bool mbCall; 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 #endif // INCLUDED_VCL_INC_SVDATA_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment