Issue 920: Fix android build with casting fix

This patch removes an unchecked conversion from a 64bit wide type
to a 32bit wide type, fixing a compile error on some platforms.

Issue:920
This commit is contained in:
Jordan Bayles 2019-06-24 14:48:59 -07:00
parent dd6921f479
commit d34479ec34

View File

@ -1905,11 +1905,10 @@ CharReader* CharReaderBuilder::newCharReader() const {
settings_["allowDroppedNullPlaceholders"].asBool(); settings_["allowDroppedNullPlaceholders"].asBool();
features.allowNumericKeys_ = settings_["allowNumericKeys"].asBool(); features.allowNumericKeys_ = settings_["allowNumericKeys"].asBool();
features.allowSingleQuotes_ = settings_["allowSingleQuotes"].asBool(); features.allowSingleQuotes_ = settings_["allowSingleQuotes"].asBool();
#if defined(JSON_HAS_INT64)
features.stackLimit_ = settings_["stackLimit"].asUInt64(); // Stack limit is always a size_t, so we get this as an unsigned int
#else // regardless of it we have 64-bit integer support enabled.
features.stackLimit_ = settings_["stackLimit"].asUInt(); features.stackLimit_ = static_cast<size_t>(settings_["stackLimit"].asUInt());
#endif
features.failIfExtra_ = settings_["failIfExtra"].asBool(); features.failIfExtra_ = settings_["failIfExtra"].asBool();
features.rejectDupKeys_ = settings_["rejectDupKeys"].asBool(); features.rejectDupKeys_ = settings_["rejectDupKeys"].asBool();
features.allowSpecialFloats_ = settings_["allowSpecialFloats"].asBool(); features.allowSpecialFloats_ = settings_["allowSpecialFloats"].asBool();