Bug 745762 - double-conversion.h fails to compile on mingw r=jwalden

This commit is contained in:
Jacek Caban 2012-04-27 11:40:05 +02:00
Родитель 2a95b98250
Коммит 8fc6a4f1be
3 изменённых файлов: 3 добавлений и 18 удалений

Просмотреть файл

@ -19,21 +19,6 @@ index f98edae..e536a01 100644
// Computes the shortest string of digits that correctly represent the input // Computes the shortest string of digits that correctly represent the input
// number. Depending on decimal_in_shortest_low and decimal_in_shortest_high // number. Depending on decimal_in_shortest_low and decimal_in_shortest_high
@@ -154,12 +155,12 @@ class DoubleToStringConverter {
// Returns true if the conversion succeeds. The conversion always succeeds
// except when the input value is special and no infinity_symbol or
// nan_symbol has been given to the constructor.
- bool ToShortest(double value, StringBuilder* result_builder) const {
+ MFBT_API(bool) ToShortest(double value, StringBuilder* result_builder) const {
return ToShortestIeeeNumber(value, result_builder, SHORTEST);
}
// Same as ToShortest, but for single-precision floats.
- bool ToShortestSingle(float value, StringBuilder* result_builder) const {
+ MFBT_API(bool) ToShortestSingle(float value, StringBuilder* result_builder) const {
return ToShortestIeeeNumber(value, result_builder, SHORTEST_SINGLE);
}
@@ -197,7 +198,7 @@ class DoubleToStringConverter { @@ -197,7 +198,7 @@ class DoubleToStringConverter {
// The last two conditions imply that the result will never contain more than // The last two conditions imply that the result will never contain more than
// 1 + kMaxFixedDigitsBeforePoint + 1 + kMaxFixedDigitsAfterPoint characters // 1 + kMaxFixedDigitsBeforePoint + 1 + kMaxFixedDigitsAfterPoint characters

Просмотреть файл

@ -155,12 +155,12 @@ class DoubleToStringConverter {
// Returns true if the conversion succeeds. The conversion always succeeds // Returns true if the conversion succeeds. The conversion always succeeds
// except when the input value is special and no infinity_symbol or // except when the input value is special and no infinity_symbol or
// nan_symbol has been given to the constructor. // nan_symbol has been given to the constructor.
MFBT_API(bool) ToShortest(double value, StringBuilder* result_builder) const { bool ToShortest(double value, StringBuilder* result_builder) const {
return ToShortestIeeeNumber(value, result_builder, SHORTEST); return ToShortestIeeeNumber(value, result_builder, SHORTEST);
} }
// Same as ToShortest, but for single-precision floats. // Same as ToShortest, but for single-precision floats.
MFBT_API(bool) ToShortestSingle(float value, StringBuilder* result_builder) const { bool ToShortestSingle(float value, StringBuilder* result_builder) const {
return ToShortestIeeeNumber(value, result_builder, SHORTEST_SINGLE); return ToShortestIeeeNumber(value, result_builder, SHORTEST_SINGLE);
} }

Просмотреть файл

@ -13,4 +13,4 @@ cp $1/src/*.h ./
cp $1/src/*.cc ./ cp $1/src/*.cc ./
patch -p3 < add-mfbt-api-markers.patch patch -p3 < add-mfbt-api-markers.patch
patch -p3 < useStandardInteger.patch patch -p3 < use-StandardInteger.patch