diff --git a/src/3rdparty/double-conversion/double-conversion/double-to-string.cc b/src/3rdparty/double-conversion/double-conversion/double-to-string.cc index 9255bce1713..bb369fe8e12 100644 --- a/src/3rdparty/double-conversion/double-conversion/double-to-string.cc +++ b/src/3rdparty/double-conversion/double-conversion/double-to-string.cc @@ -56,7 +56,7 @@ bool DoubleToStringConverter::HandleSpecialValues( StringBuilder* result_builder) const { Double double_inspect(value); if (double_inspect.IsInfinite()) { - if (infinity_symbol_ == NULL) return false; + if (infinity_symbol_ == DOUBLE_CONVERSION_NULLPTR) return false; if (value < 0) { result_builder->AddCharacter('-'); } @@ -64,7 +64,7 @@ bool DoubleToStringConverter::HandleSpecialValues( return true; } if (double_inspect.IsNan()) { - if (nan_symbol_ == NULL) return false; + if (nan_symbol_ == DOUBLE_CONVERSION_NULLPTR) return false; result_builder->AddString(nan_symbol_); return true; } diff --git a/src/3rdparty/double-conversion/double-conversion/string-to-double.cc b/src/3rdparty/double-conversion/double-conversion/string-to-double.cc index fe633aace78..972956ca690 100644 --- a/src/3rdparty/double-conversion/double-conversion/string-to-double.cc +++ b/src/3rdparty/double-conversion/double-conversion/string-to-double.cc @@ -474,7 +474,7 @@ double StringToDoubleConverter::StringToIeee( current = next_non_space; } - if (infinity_symbol_ != NULL) { + if (infinity_symbol_ != DOUBLE_CONVERSION_NULLPTR) { if (ConsumeFirstCharacter(*current, infinity_symbol_, allow_case_insensitivity)) { if (!ConsumeSubString(¤t, end, infinity_symbol_, allow_case_insensitivity)) { return junk_string_value_; @@ -492,7 +492,7 @@ double StringToDoubleConverter::StringToIeee( } } - if (nan_symbol_ != NULL) { + if (nan_symbol_ != DOUBLE_CONVERSION_NULLPTR) { if (ConsumeFirstCharacter(*current, nan_symbol_, allow_case_insensitivity)) { if (!ConsumeSubString(¤t, end, nan_symbol_, allow_case_insensitivity)) { return junk_string_value_; diff --git a/src/3rdparty/double-conversion/double-conversion/utils.h b/src/3rdparty/double-conversion/double-conversion/utils.h index 41078b6c2c4..4f4dd71bf75 100644 --- a/src/3rdparty/double-conversion/double-conversion/utils.h +++ b/src/3rdparty/double-conversion/double-conversion/utils.h @@ -34,6 +34,13 @@ #include #include +// For pre-C++11 compatibility +#if __cplusplus >= 201103L +#define DOUBLE_CONVERSION_NULLPTR nullptr +#else +#define DOUBLE_CONVERSION_NULLPTR NULL +#endif + #include #ifndef DOUBLE_CONVERSION_ASSERT #define DOUBLE_CONVERSION_ASSERT(condition) \ @@ -241,9 +248,9 @@ inline int StrLength(const char* string) { template class Vector { public: - Vector() : start_(NULL), length_(0) {} + Vector() : start_(DOUBLE_CONVERSION_NULLPTR), length_(0) {} Vector(T* data, int len) : start_(data), length_(len) { - DOUBLE_CONVERSION_ASSERT(len == 0 || (len > 0 && data != NULL)); + DOUBLE_CONVERSION_ASSERT(len == 0 || (len > 0 && data != DOUBLE_CONVERSION_NULLPTR)); } // Returns a vector using the same backing storage as this one, @@ -326,7 +333,7 @@ class StringBuilder { void AddSubstring(const char* s, int n) { DOUBLE_CONVERSION_ASSERT(!is_finalized() && position_ + n < buffer_.length()); DOUBLE_CONVERSION_ASSERT(static_cast(n) <= strlen(s)); - memmove(&buffer_[position_], s, n); + memmove(&buffer_[position_], s, static_cast(n)); position_ += n; } diff --git a/src/3rdparty/double-conversion/qt_attribution.json b/src/3rdparty/double-conversion/qt_attribution.json index a9112d9e927..21692f0490a 100644 --- a/src/3rdparty/double-conversion/qt_attribution.json +++ b/src/3rdparty/double-conversion/qt_attribution.json @@ -5,8 +5,8 @@ "QtUsage": "Used in Qt Core. Configure with -system-doubleconversion or -no-doubleconversion to avoid.", "Homepage": "https://github.com/google/double-conversion", - "Version": "3.2.0+e634f265db5d296bd7a780f9813d6b8573f5bd90", - "DownloadLocation": "https://github.com/google/double-conversion/commit/e634f265db5d296bd7a780f9813d6b8573f5bd90", + "Version": "3.2.1", + "DownloadLocation": "https://github.com/google/double-conversion/releases/tag/v3.2.1", "License": "BSD 3-clause \"New\" or \"Revised\" License", "LicenseId": "BSD-3-Clause", "LicenseFile": "LICENSE",