Kaydet (Commit) 71a1df3e authored tarafından Stephan Bergmann's avatar Stephan Bergmann

-Wc++11-narrowing

"non-constant-expression cannot be narrowed from type 'size_t' (aka 'unsigned
long') to 'uint16' (aka 'unsigned short') in initializer list" etc. with Clang
-std=c++11

Change-Id: I15ff37bbc3d20c14db850678a9b9e295b900de85
üst d0b590fe
......@@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,graphite,$(GRAPHITE_TARBALL)))
$(eval $(call gb_UnpackedTarball_add_patches,graphite,\
graphite/graphite2.patch \
graphite/graphite2.issue1030.patch.1 \
graphite/graphite2.narrowing.patch.1 \
))
# vim: set noet sw=4 ts=4:
--- graphite/src/Code.cpp
+++ graphite/src/Code.cpp
@@ -169,8 +169,8 @@ Machine::Code::Code(bool is_constraint,
bytecode_end,
pre_context,
rule_length,
- silf.numClasses(),
- face.glyphs().numAttrs(),
+ static_cast<uint16>(silf.numClasses()),
+ static_cast<uint16>(face.glyphs().numAttrs()),
face.numFeatures(),
{1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,255,
@@ -178,7 +178,7 @@ Machine::Code::Code(bool is_constraint,
1,1,1,1,1,1,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0, silf.numUser()}
+ 0,0,0,0,0,0,0, static_cast<byte>(silf.numUser())}
};
decoder dec(lims, *this);
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