summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2021-05-01 22:13:37 +0900
committerTomaž Vajngerl <quikee@gmail.com>2021-05-11 12:28:24 +0200
commiteb6819e74a66750235d3a4a894479faeee8146e2 (patch)
treec898ab63731449cf5176f35a16bacea0bb58f864 /vcl
parente6c0c282be59a5198932604d6c40de837b7cb548 (diff)
change usage of boost::hash_combine to o3tl::hash_combine
Change-Id: I840518a36ac43d36c95f38e09c7bfcfe1a25a525 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114984 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/android/androidinst.cxx1
-rw-r--r--vcl/inc/ControlCacheKey.hxx12
-rw-r--r--vcl/inc/impfontcache.hxx6
-rw-r--r--vcl/inc/svdata.hxx8
-rw-r--r--vcl/inc/widgetdraw/WidgetDefinition.hxx6
-rw-r--r--vcl/source/font/fontinstance.cxx7
-rw-r--r--vcl/source/gdi/gfxlink.cxx4
-rw-r--r--vcl/source/graphic/BinaryDataContainer.cxx6
-rw-r--r--vcl/unx/generic/app/wmadaptor.cxx1
-rw-r--r--vcl/unx/generic/fontmanager/fontconfig.cxx12
-rw-r--r--vcl/unx/generic/gdi/cairotextrender.cxx2
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx8
-rw-r--r--vcl/win/gdi/winlayout.cxx6
13 files changed, 42 insertions, 37 deletions
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 94e5f4227344..dafd43f7aad8 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -22,6 +22,7 @@
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
#include <memory>
+#include <unistd.h>
#define LOGTAG "LibreOffice/androidinst"
#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, LOGTAG, __VA_ARGS__))
diff --git a/vcl/inc/ControlCacheKey.hxx b/vcl/inc/ControlCacheKey.hxx
index e4e7616e2322..658d05bc84a2 100644
--- a/vcl/inc/ControlCacheKey.hxx
+++ b/vcl/inc/ControlCacheKey.hxx
@@ -22,7 +22,7 @@
#include <tools/gen.hxx>
#include <vcl/salnativewidgets.hxx>
-#include <boost/functional/hash.hpp>
+#include <o3tl/hash_combine.hxx>
class ControlCacheKey
{
@@ -81,11 +81,11 @@ 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());
+ o3tl::hash_combine(seed, aCache.mnType);
+ o3tl::hash_combine(seed, aCache.mnPart);
+ o3tl::hash_combine(seed, aCache.mnState);
+ o3tl::hash_combine(seed, aCache.maSize.Width());
+ o3tl::hash_combine(seed, aCache.maSize.Height());
return seed;
}
};
diff --git a/vcl/inc/impfontcache.hxx b/vcl/inc/impfontcache.hxx
index 07e04a0cc848..09aa33ca906b 100644
--- a/vcl/inc/impfontcache.hxx
+++ b/vcl/inc/impfontcache.hxx
@@ -20,10 +20,10 @@
#ifndef INCLUDED_VCL_INC_IMPFONTCACHE_HXX
#define INCLUDED_VCL_INC_IMPFONTCACHE_HXX
-#include <boost/functional/hash.hpp>
#include <rtl/ref.hxx>
#include <o3tl/lru_map.hxx>
+#include <o3tl/hash_combine.hxx>
#include <tools/gen.hxx>
#include <vcl/glyphitem.hxx>
@@ -53,8 +53,8 @@ struct GlyphBoundRectCacheHash
std::size_t operator()(GlyphBoundRectCacheKey const& aCache) const
{
std::size_t seed = 0;
- boost::hash_combine(seed, aCache.m_pFont);
- boost::hash_combine(seed, aCache.m_nId);
+ o3tl::hash_combine(seed, aCache.m_pFont);
+ o3tl::hash_combine(seed, aCache.m_nId);
return seed;
}
};
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 822b15b378ee..01010f1e61e7 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -23,6 +23,7 @@
#include <config_version.h>
#include <o3tl/lru_map.hxx>
+#include <o3tl/hash_combine.hxx>
#include <tools/fldunit.hxx>
#include <unotools/options.hxx>
#include <vcl/bitmapex.hxx>
@@ -41,7 +42,6 @@
#include <mutex>
#include <vector>
#include <unordered_map>
-#include <boost/functional/hash.hpp>
#include "ControlCacheKey.hxx"
#include "schedulerimpl.hxx"
#include <basegfx/DrawCommands.hxx>
@@ -194,9 +194,9 @@ template <> struct hash<ScaleCacheKey>
std::size_t operator()(ScaleCacheKey const& k) const noexcept
{
std::size_t seed = 0;
- boost::hash_combine(seed, k.mpBitmap);
- boost::hash_combine(seed, k.maDestSize.getWidth());
- boost::hash_combine(seed, k.maDestSize.getHeight());
+ o3tl::hash_combine(seed, k.mpBitmap);
+ o3tl::hash_combine(seed, k.maDestSize.getWidth());
+ o3tl::hash_combine(seed, k.maDestSize.getHeight());
return seed;
}
};
diff --git a/vcl/inc/widgetdraw/WidgetDefinition.hxx b/vcl/inc/widgetdraw/WidgetDefinition.hxx
index cc3eb6606557..65a4dcb32c29 100644
--- a/vcl/inc/widgetdraw/WidgetDefinition.hxx
+++ b/vcl/inc/widgetdraw/WidgetDefinition.hxx
@@ -18,7 +18,7 @@
#include <unordered_map>
#include <vector>
#include <cstddef>
-#include <boost/functional/hash.hpp>
+#include <o3tl/hash_combine.hxx>
#include <vcl/salnativewidgets.hxx>
namespace vcl
@@ -145,8 +145,8 @@ template <> struct VCL_DLLPUBLIC hash<vcl::ControlTypeAndPart>
std::size_t operator()(vcl::ControlTypeAndPart const& rControlTypeAndPart) const noexcept
{
std::size_t seed = 0;
- boost::hash_combine(seed, rControlTypeAndPart.meType);
- boost::hash_combine(seed, rControlTypeAndPart.mePart);
+ o3tl::hash_combine(seed, rControlTypeAndPart.meType);
+ o3tl::hash_combine(seed, rControlTypeAndPart.mePart);
return seed;
}
};
diff --git a/vcl/source/font/fontinstance.cxx b/vcl/source/font/fontinstance.cxx
index f56333f6cf8a..48e4c291c350 100644
--- a/vcl/source/font/fontinstance.cxx
+++ b/vcl/source/font/fontinstance.cxx
@@ -23,9 +23,10 @@
#include <fontinstance.hxx>
#include <impfontcache.hxx>
-
#include <PhysicalFontFace.hxx>
+#include <o3tl/hash_combine.hxx>
+
// extend std namespace to add custom hash needed for LogicalFontInstance
namespace std
@@ -35,8 +36,8 @@ namespace std
size_t operator()(const pair< sal_UCS4, FontWeight >& rData) const
{
std::size_t seed = 0;
- boost::hash_combine(seed, rData.first);
- boost::hash_combine(seed, rData.second);
+ o3tl::hash_combine(seed, rData.first);
+ o3tl::hash_combine(seed, rData.second);
return seed;
}
};
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx
index 82b37fe4e668..cc5386039e3a 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -24,7 +24,7 @@
#include <vcl/gfxlink.hxx>
#include <vcl/graphicfilter.hxx>
#include <memory>
-#include <boost/functional/hash.hpp>
+#include <o3tl/hash_combine.hxx>
GfxLink::GfxLink()
: meType(GfxLinkType::NONE)
@@ -60,7 +60,7 @@ size_t GfxLink::GetHash() const
if (!maHash)
{
std::size_t seed = maDataContainer.calculateHash();
- boost::hash_combine(seed, meType);
+ o3tl::hash_combine(seed, meType);
maHash = seed;
}
return maHash;
diff --git a/vcl/source/graphic/BinaryDataContainer.cxx b/vcl/source/graphic/BinaryDataContainer.cxx
index ba7a9f597c1f..339d28d601d0 100644
--- a/vcl/source/graphic/BinaryDataContainer.cxx
+++ b/vcl/source/graphic/BinaryDataContainer.cxx
@@ -9,7 +9,7 @@
*/
#include <vcl/BinaryDataContainer.hxx>
-#include <boost/functional/hash.hpp>
+#include <o3tl/hash_combine.hxx>
BinaryDataContainer::BinaryDataContainer() = default;
@@ -27,9 +27,9 @@ BinaryDataContainer::BinaryDataContainer(std::unique_ptr<std::vector<sal_uInt8>>
size_t BinaryDataContainer::calculateHash() const
{
size_t nSeed = 0;
- boost::hash_combine(nSeed, getSize());
+ o3tl::hash_combine(nSeed, getSize());
for (sal_uInt8 const& rByte : *mpData)
- boost::hash_combine(nSeed, rByte);
+ o3tl::hash_combine(nSeed, rByte);
return nSeed;
}
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index 0b4c75e8b305..42896c694794 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -19,6 +19,7 @@
#include <string.h>
#include <stdlib.h>
+#include <unistd.h>
#include <string_view>
#include <i18nlangtag/languagetag.hxx>
diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx
index 8121158013dc..9b16cd9cd5c5 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -47,7 +47,7 @@ using namespace psp;
#include <osl/process.h>
-#include <boost/functional/hash.hpp>
+#include <o3tl/hash_combine.hxx>
#include <utility>
#include <algorithm>
@@ -86,11 +86,11 @@ template <> struct hash<FontOptionsKey>
std::size_t operator()(const FontOptionsKey& k) const noexcept
{
std::size_t seed = k.m_sFamilyName.hashCode();
- boost::hash_combine(seed, k.m_nFontSize);
- boost::hash_combine(seed, k.m_eItalic);
- boost::hash_combine(seed, k.m_eWeight);
- boost::hash_combine(seed, k.m_eWidth);
- boost::hash_combine(seed, k.m_ePitch);
+ o3tl::hash_combine(seed, k.m_nFontSize);
+ o3tl::hash_combine(seed, k.m_eItalic);
+ o3tl::hash_combine(seed, k.m_eWeight);
+ o3tl::hash_combine(seed, k.m_eWidth);
+ o3tl::hash_combine(seed, k.m_ePitch);
return seed;
}
};
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index b121f0f1b9d1..4828a49a967a 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -27,6 +27,8 @@
#include <cairo.h>
#include <cairo-ft.h>
+#include <deque>
+
namespace {
typedef struct FT_FaceRec_* FT_Face;
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 75abab8bc728..ecafa66a1620 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -56,7 +56,7 @@
#include <config_dbus.h>
#include <config_gio.h>
-#include <boost/functional/hash.hpp>
+#include <o3tl/hash_combine.hxx>
namespace psp
{
@@ -78,9 +78,9 @@ namespace psp
size_t operator()(const css::lang::Locale& rLocale) const
{
std::size_t seed = 0;
- boost::hash_combine(seed, rLocale.Language.hashCode());
- boost::hash_combine(seed, rLocale.Country.hashCode());
- boost::hash_combine(seed, rLocale.Variant.hashCode());
+ o3tl::hash_combine(seed, rLocale.Language.hashCode());
+ o3tl::hash_combine(seed, rLocale.Country.hashCode());
+ o3tl::hash_combine(seed, rLocale.Variant.hashCode());
return seed;
}
};
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index c0fe1e32b863..927694f8b450 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -46,7 +46,7 @@
#include <rtl/character.hxx>
-#include <boost/functional/hash.hpp>
+#include <o3tl/hash_combine.hxx>
#include <algorithm>
#include <shlwapi.h>
@@ -171,8 +171,8 @@ struct BlobCacheKeyHash
std::size_t operator()(BlobCacheKey const& rKey) const
{
std::size_t seed = 0;
- boost::hash_combine(seed, rKey.first.get());
- boost::hash_combine(seed, rKey.second);
+ o3tl::hash_combine(seed, rKey.first.get());
+ o3tl::hash_combine(seed, rKey.second);
return seed;
}
};