external/afdko: Fix some errors
...hitting at least with recent Clang 23 trunk and --with-latest-c++,
> engine/workdir/UnpackedTarball/afdko/c/shared/absfont/absfont_dump.cpp:555:19: error: invalid comparison of floating-point type 'float' with enumeration type '(unnamed enum at
engine/workdir/UnpackedTarball/afdko/c/shared/include/absfont.h:541:1)'
> 555 | if (width == ABF_EDGE_HINT_LO) {
> | ~~~~~ ^ ~~~~~~~~~~~~~~~~
etc. and
> .../include/c++/17.0.0/bits/unique_ptr.h:90:16: error: invalid application of 'sizeof' to an incomplete type 'VarModel'
> 90 | static_assert(sizeof(_Tp)>0,
> | ^~~~~~~~~~~
> [...]
> engine/workdir/UnpackedTarball/afdko/c/shared/include/varsupport.h:466:5: note: in defaulted default constructor for 'std::vector<std::unique_ptr<VarModel>>' first required here
> 466 | itemVariationStore() {}
> | ^
> engine/workdir/UnpackedTarball/afdko/c/shared/include/varsupport.h:424:7: note: forward declaration of 'VarModel'
> 424 | class VarModel;
presumably new with 6c40019917bd6e88f6b54d0a2d53d64729c64166 "afdko:
upgrade to 5.0.1"
Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I7f7de8233fcd9a2447d0080af3ff14b0bdf69a10
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4879
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 7bc7ade726e4d50c1589247123e8104783a5e604)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207287
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
This commit is contained in:
committed by
Xisco Fauli
parent
a3a4e2b88b
commit
d862077a2e
+1
@@ -35,6 +35,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,afdko, \
|
||||
external/afdko/ubsan.patch.0 \
|
||||
external/afdko/cstdint.patch \
|
||||
external/afdko/classrec-fallback-ref.patch.0 \
|
||||
external/afdko/clang.patch.0 \
|
||||
))
|
||||
|
||||
# static replacement for the cmake-generated version files
|
||||
|
||||
Vendored
+87
@@ -0,0 +1,87 @@
|
||||
--- c/shared/absfont/absfont_dump.cpp
|
||||
+++ c/shared/absfont/absfont_dump.cpp
|
||||
@@ -552,11 +552,11 @@
|
||||
// dumpInstr(cb, " %.3f %.3f %s", edge0, edge1, (flags & ABF_VERT_STEM)? "vstem3": "hstem3");
|
||||
} else {
|
||||
float width = RND(edge1 - edge0);
|
||||
- if (width == ABF_EDGE_HINT_LO) {
|
||||
+ if (width == float(ABF_EDGE_HINT_LO)) {
|
||||
writeReal(buf, bufLen, edge1);
|
||||
STRCAT_S(buf, bufLen, (flags & ABF_VERT_STEM) ? " leftedge" : " bottomedge");
|
||||
// dumpInstr(cb, " %.3f %s", edge1, (flags & ABF_VERT_STEM)? "leftedge": "bottomedge");
|
||||
- } else if (width == ABF_EDGE_HINT_HI) {
|
||||
+ } else if (width == float(ABF_EDGE_HINT_HI)) {
|
||||
writeReal(buf, bufLen, edge0);
|
||||
STRCAT_S(buf, bufLen, (flags & ABF_VERT_STEM) ? " rightedge" : " topedge");
|
||||
// dumpInstr(cb, " %.3f %s", edge0, (flags & ABF_VERT_STEM)? "rightedge": "topedge");
|
||||
--- c/shared/cffwrite/cffwrite_t2cstr.cpp
|
||||
+++ c/shared/cffwrite/cffwrite_t2cstr.cpp
|
||||
@@ -1643,7 +1643,7 @@
|
||||
#endif
|
||||
|
||||
delta = edge1 - edge0;
|
||||
- if (delta < 0 && delta != ABF_EDGE_HINT_LO && delta != ABF_EDGE_HINT_HI) {
|
||||
+ if (delta < 0 && delta != float(ABF_EDGE_HINT_LO) && delta != float(ABF_EDGE_HINT_HI)) {
|
||||
if (!(h->g->flags & CFW_NO_HINT_WARNINGS))
|
||||
addWarn(h, warn_hint0);
|
||||
_new.edge0v.value = edge1;
|
||||
@@ -1716,7 +1716,7 @@
|
||||
#endif
|
||||
|
||||
delta = edge1 - edge0;
|
||||
- if (delta < 0 && delta != ABF_EDGE_HINT_LO && delta != ABF_EDGE_HINT_HI) {
|
||||
+ if (delta < 0 && delta != float(ABF_EDGE_HINT_LO) && delta != float(ABF_EDGE_HINT_HI)) {
|
||||
if (!(h->g->flags & CFW_NO_HINT_WARNINGS))
|
||||
addWarn(h, warn_hint0);
|
||||
_new.edge0v = *edge1v;
|
||||
--- c/shared/include/varsupport.h
|
||||
+++ c/shared/include/varsupport.h
|
||||
@@ -463,7 +463,7 @@
|
||||
ivsOffset - offset to the IVS data from the beginning of the
|
||||
container table.
|
||||
*/
|
||||
- itemVariationStore() {}
|
||||
+ itemVariationStore();
|
||||
itemVariationStore(ctlSharedStmCallbacks *sscb, uint32_t tableOffset,
|
||||
uint32_t tableLength, uint32_t ivsOffset);
|
||||
|
||||
@@ -594,16 +594,7 @@
|
||||
|
||||
void write(VarWriter &vw);
|
||||
|
||||
- void reset(bool clearAxisCount = false) {
|
||||
- if (clearAxisCount)
|
||||
- axisCount = 0;
|
||||
- regions.clear();
|
||||
- regionMap.clear();
|
||||
- subtables.clear();
|
||||
- values.clear();
|
||||
- models.clear();
|
||||
- locationSetMap.clear();
|
||||
- }
|
||||
+ void reset(bool clearAxisCount = false);
|
||||
|
||||
private:
|
||||
uint32_t getRegionListSize() {
|
||||
--- c/shared/varsupport.cpp
|
||||
+++ c/shared/varsupport.cpp
|
||||
@@ -673,6 +673,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
+itemVariationStore::itemVariationStore() {}
|
||||
+
|
||||
+void itemVariationStore::reset(bool clearAxisCount) {
|
||||
+ if (clearAxisCount)
|
||||
+ axisCount = 0;
|
||||
+ regions.clear();
|
||||
+ regionMap.clear();
|
||||
+ subtables.clear();
|
||||
+ values.clear();
|
||||
+ models.clear();
|
||||
+ locationSetMap.clear();
|
||||
+}
|
||||
+
|
||||
/* item variation store sub-table */
|
||||
|
||||
itemVariationStore::itemVariationStore(ctlSharedStmCallbacks *sscb,
|
||||
Reference in New Issue
Block a user