Skip to content

Commit d4e745a

Browse files
committed
Rename make_float() to multiplyByPowerOfTen()
1 parent 5ccf645 commit d4e745a

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/ArduinoJson/Numbers/FloatTraits.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,9 @@ struct FloatTraits<T, 4 /*32bits*/> {
192192
}
193193
};
194194

195+
// Returns m*10^e
195196
template <typename TFloat, typename TExponent>
196-
inline TFloat make_float(TFloat m, TExponent e) {
197+
inline TFloat multiplyByPowerOfTen(TFloat m, TExponent e) {
197198
using traits = FloatTraits<TFloat>;
198199

199200
auto powersOfTen = e > 0 ? traits::positiveBinaryPowersOfTen()

src/ArduinoJson/Numbers/parseNumber.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,12 @@ inline Number parseNumber(const char* s) {
220220
exponent > FloatTraits<float>::exponent_max ||
221221
mantissa > FloatTraits<float>::mantissa_max;
222222
if (isDouble) {
223-
auto final_result = make_float(double(mantissa), exponent);
223+
auto final_result = multiplyByPowerOfTen(double(mantissa), exponent);
224224
return Number(is_negative ? -final_result : final_result);
225225
} else
226226
#endif
227227
{
228-
auto final_result = make_float(float(mantissa), exponent);
228+
auto final_result = multiplyByPowerOfTen(float(mantissa), exponent);
229229
return Number(is_negative ? -final_result : final_result);
230230
}
231231
}

0 commit comments

Comments
 (0)