summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2018-11-30 11:51:26 -0500
committerBehdad Esfahbod <behdad@behdad.org>2018-11-30 11:52:41 -0500
commitabd81ed4f5cbc5a94171747909bc6b77551cb929 (patch)
tree428a8cb971205b2720e15ee4d4978770561155ee
parent0f32c95e1487ffcc37439635c3294f941eae857a (diff)
Umm. Cryptic, yes
In file included from hb-face.cc:35: hb-ot-cmap-table.hh: In member function 'void OT::CmapSubtableFormat4::_compiles_assertion_on_line_388() const': hb-ot-cmap-table.hh:388: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-open-type.hh:354: note: candidate 1: const Type& OT::UnsizedArrayOf<Type>::operator[](unsigned int) const [with Type = OT::IntType<short unsigned int, 2u>] hb-ot-cmap-table.hh:388: note: candidate 2: operator[](const T*, int) <built-in> hb-ot-cmap-table.hh: In member function 'void OT::CmapSubtableFormat4::_instance_assertion_on_line_388() const': hb-ot-cmap-table.hh:388: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-open-type.hh:354: note: candidate 1: const Type& OT::UnsizedArrayOf<Type>::operator[](unsigned int) const [with Type = OT::IntType<short unsigned int, 2u>] hb-ot-cmap-table.hh:388: note: candidate 2: operator[](const T*, int) <built-in> hb-face.cc: In function 'hb_blob_t* _hb_face_builder_data_reference_blob(hb_face_builder_data_t*)': hb-face.cc:650: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u] hb-face.cc:650: note: candidate 2: operator[](T*, int) <built-in> hb-face.cc:650: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u] hb-face.cc:650: note: candidate 2: operator[](const T*, int) <built-in> hb-face.cc:651: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u] hb-face.cc:651: note: candidate 2: operator[](T*, int) <built-in> hb-face.cc:651: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u] hb-face.cc:651: note: candidate 2: operator[](const T*, int) <built-in>
-rw-r--r--src/hb-face.cc4
-rw-r--r--src/hb-machinery.hh4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/hb-face.cc b/src/hb-face.cc
index 724f54d5..a1ae1d77 100644
--- a/src/hb-face.cc
+++ b/src/hb-face.cc
@@ -647,8 +647,8 @@ _hb_face_builder_data_reference_blob (hb_face_builder_data_t *data)
bool is_cff = data->tables.lsearch (HB_TAG ('C','F','F',' ')) || data->tables.lsearch (HB_TAG ('C','F','F','2'));
hb_tag_t sfnt_tag = is_cff ? OT::OpenTypeFontFile::CFFTag : OT::OpenTypeFontFile::TrueTypeTag;
- Supplier<hb_tag_t> tags_supplier (&data->tables[0].tag, table_count, data->tables.item_size);
- Supplier<hb_blob_t *> blobs_supplier (&data->tables[0].blob, table_count, data->tables.item_size);
+ Supplier<hb_tag_t> tags_supplier (&data->tables[0u].tag, table_count, data->tables.item_size);
+ Supplier<hb_blob_t *> blobs_supplier (&data->tables[0u].blob, table_count, data->tables.item_size);
bool ret = f->serialize_single (&c,
sfnt_tag,
tags_supplier,
diff --git a/src/hb-machinery.hh b/src/hb-machinery.hh
index 1732d297..19d2e17a 100644
--- a/src/hb-machinery.hh
+++ b/src/hb-machinery.hh
@@ -117,8 +117,8 @@ static inline Type& StructAfter(TObject &X)
enum { min_size = (size) }
#define DEFINE_SIZE_ARRAY(size, array) \
- DEFINE_COMPILES_ASSERTION ((void) (array)[0].static_size) \
- DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + VAR * sizeof ((array)[0])) \
+ DEFINE_COMPILES_ASSERTION ((void) (array)[0u].static_size) \
+ DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + VAR * sizeof ((array)[0u])) \
enum { null_size = (size) }; \
enum { min_size = (size) }