mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-31 03:07:36 +02:00
Fix ambiguous complier error C2666 in vs2017.The '+' opeator may cause ambiguity.Avoid implicit conversion.
This commit is contained in:
committed by
Victor Zverovich
parent
77656c672c
commit
2ff4996d05
@ -2975,7 +2975,7 @@ class format_int {
|
|||||||
|
|
||||||
// Formats value in reverse and returns a pointer to the beginning.
|
// Formats value in reverse and returns a pointer to the beginning.
|
||||||
char *format_decimal(unsigned long long value) {
|
char *format_decimal(unsigned long long value) {
|
||||||
char *ptr = buffer_ + BUFFER_SIZE - 1;
|
char *ptr = buffer_ + static_cast<unsigned>(BUFFER_SIZE) - 1;
|
||||||
while (value >= 100) {
|
while (value >= 100) {
|
||||||
// Integer division is slow so do it for a group of two digits instead
|
// Integer division is slow so do it for a group of two digits instead
|
||||||
// of for every digit. The idea comes from the talk by Alexandrescu
|
// of for every digit. The idea comes from the talk by Alexandrescu
|
||||||
|
Reference in New Issue
Block a user