瀏覽代碼

String: Use ABS macro in padding code

Follow-up to #39261.

(cherry picked from commit cbcc0eacd5cd7af661ec99dcdc8e5a69a8a7ca5d)
Rémi Verschelde 5 年之前
父節點
當前提交
362193db6a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/ustring.cpp

+ 1 - 1
core/ustring.cpp

@@ -4212,7 +4212,7 @@ String String::sprintf(const Array &values, bool *error) const {
 
 					double value = values[value_index];
 					bool is_negative = (value < 0);
-					String str = String::num(abs(value), min_decimals);
+					String str = String::num(ABS(value), min_decimals);
 
 					// Pad decimals out.
 					str = str.pad_decimals(min_decimals);