summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Gaillard <jgaillard@google.com>2023-12-13 18:50:39 +0000
committerJerome Gaillard <jgaillard@google.com>2023-12-13 18:55:12 +0000
commit2ddfc05c281623c991753d3c04374e60d9431743 (patch)
tree12e75e874ed69b099b63331a37e5c4b59124f880
parente68bf31aedbee180f3a4ce0073937cfc1fdf0b4b (diff)
downloadminikin-2ddfc05c281623c991753d3c04374e60d9431743.tar.gz
Fix build for macOS
On macOS, size_t is neither uint32_t nor uint64_t. So compilation fails because no update method corresponds. This casts the result of vector::size to uint32_t to fix this, just as was done for strings in updateString. Bug: N/A Test: N/A Change-Id: Icfd0ce32db4f770bd1b0c5f164c4c87e846ae1d9
-rw-r--r--include/minikin/Hasher.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/minikin/Hasher.h b/include/minikin/Hasher.h
index 4e20195..dcfdd0b 100644
--- a/include/minikin/Hasher.h
+++ b/include/minikin/Hasher.h
@@ -58,7 +58,8 @@ public:
}
inline Hasher& update(const std::vector<FontFeature>& features) {
- update(features.size());
+ uint32_t size = features.size();
+ update(size);
for (const FontFeature& feature : features) {
update(feature);
}