From cbe11794432f5ebf0221ecb04206ab017376bf19 Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Mon, 18 Nov 2019 16:43:07 +0100 Subject: [PATCH] clang++ compile fix --- .travis.yml | 6 ++---- src/fstring.cpp | 4 ++-- src/include/final/fstring.h | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 600cf305..37cf2eca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,6 @@ addons: homebrew: packages: - autoconf-archive - update: true env: global: @@ -110,13 +109,12 @@ matrix: # macOS # - os: osx - osx_image: xcode8 + osx_image: xcode11 env: - TEST="macOS" - - MATRIX_EVAL="brew install gcc && CC=gcc-7 && CXX=g++-7" before_install: - - eval "${MATRIX_EVAL}" - uname -a + - g++ --version script: - autoreconf -v --install --force - ./configure --prefix=/usr diff --git a/src/fstring.cpp b/src/fstring.cpp index ab4c24db..d92aea0d 100644 --- a/src/fstring.cpp +++ b/src/fstring.cpp @@ -779,7 +779,7 @@ FString& FString::setNumber (sInt64 num) uInt64 abs_num = static_cast(num); if ( num < 0 ) - abs_num = -num; + abs_num = static_cast(-num); *s = '\0'; @@ -858,7 +858,7 @@ FString& FString::setFormatedNumber (sInt64 num, char separator) separator = ' '; if ( num < 0 ) - abs_num = -num; + abs_num = static_cast(-num); *s = L'\0'; diff --git a/src/include/final/fstring.h b/src/include/final/fstring.h index 26dbafcf..d3ecae45 100644 --- a/src/include/final/fstring.h +++ b/src/include/final/fstring.h @@ -287,7 +287,7 @@ class FString template ::value || std::is_floating_point::value - , int>::type = 0 > + , int>::type > inline FString& FString::operator << (const NumT val) { FString numstr(FString().setNumber(val));