From 252225fa9b2dd3dbc0a3c87bc65ce1f821706e7e Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 29 Jan 2019 13:58:51 -0800 Subject: Clerified some ints. --- src/stable/formatter.cpp | 36 ++++++++++++++++++------------------ src/stable/formatter.h | 24 ++++++++++++------------ src/stable/string.h | 2 ++ src/unit/variant.unit | 4 ++++ 4 files changed, 36 insertions(+), 30 deletions(-) diff --git a/src/stable/formatter.cpp b/src/stable/formatter.cpp index f8da5a1..dc83b2e 100644 --- a/src/stable/formatter.cpp +++ b/src/stable/formatter.cpp @@ -377,15 +377,15 @@ Bu::Formatter &Bu::operator<<( Bu::Formatter &f, unsigned char c ) return f; } -Bu::Formatter &Bu::operator<<( Bu::Formatter &f, signed short i ) +Bu::Formatter &Bu::operator<<( Bu::Formatter &f, signed short int i ) { - f.ifmt( i ); + f.ifmt( i ); return f; } -Bu::Formatter &Bu::operator<<( Bu::Formatter &f, unsigned short i ) +Bu::Formatter &Bu::operator<<( Bu::Formatter &f, unsigned short int i ) { - f.ufmt( i ); + f.ufmt( i ); return f; } @@ -401,27 +401,27 @@ Bu::Formatter &Bu::operator<<( Bu::Formatter &f, unsigned int i ) return f; } -Bu::Formatter &Bu::operator<<( Bu::Formatter &f, signed long i ) +Bu::Formatter &Bu::operator<<( Bu::Formatter &f, signed long int i ) { - f.ifmt( i ); + f.ifmt( i ); return f; } -Bu::Formatter &Bu::operator<<( Bu::Formatter &f, unsigned long i ) +Bu::Formatter &Bu::operator<<( Bu::Formatter &f, unsigned long int i ) { - f.ufmt( i ); + f.ufmt( i ); return f; } -Bu::Formatter &Bu::operator<<( Bu::Formatter &f, signed long long i ) +Bu::Formatter &Bu::operator<<( Bu::Formatter &f, signed long long int i ) { - f.ifmt( i ); + f.ifmt( i ); return f; } -Bu::Formatter &Bu::operator<<( Bu::Formatter &f, unsigned long long i ) +Bu::Formatter &Bu::operator<<( Bu::Formatter &f, unsigned long long int i ) { - f.ufmt( i ); + f.ufmt( i ); return f; } @@ -473,13 +473,13 @@ Bu::Formatter &Bu::operator>>( Bu::Formatter &f, unsigned char &c ) return f; } -Bu::Formatter &Bu::operator>>( Bu::Formatter &f, signed short &i ) +Bu::Formatter &Bu::operator>>( Bu::Formatter &f, signed short int &i ) { f.iparse( i, f.readToken() ); return f; } -Bu::Formatter &Bu::operator>>( Bu::Formatter &f, unsigned short &i ) +Bu::Formatter &Bu::operator>>( Bu::Formatter &f, unsigned short int &i ) { f.uparse( i, f.readToken() ); return f; @@ -497,25 +497,25 @@ Bu::Formatter &Bu::operator>>( Bu::Formatter &f, unsigned int &i ) return f; } -Bu::Formatter &Bu::operator>>( Bu::Formatter &f, signed long &i ) +Bu::Formatter &Bu::operator>>( Bu::Formatter &f, signed long int &i ) { f.iparse( i, f.readToken() ); return f; } -Bu::Formatter &Bu::operator>>( Bu::Formatter &f, unsigned long &i ) +Bu::Formatter &Bu::operator>>( Bu::Formatter &f, unsigned long int &i ) { f.uparse( i, f.readToken() ); return f; } -Bu::Formatter &Bu::operator>>( Bu::Formatter &f, signed long long &i ) +Bu::Formatter &Bu::operator>>( Bu::Formatter &f, signed long long int &i ) { f.iparse( i, f.readToken() ); return f; } -Bu::Formatter &Bu::operator>>( Bu::Formatter &f, unsigned long long &i ) +Bu::Formatter &Bu::operator>>( Bu::Formatter &f, unsigned long long int &i ) { f.uparse( i, f.readToken() ); return f; diff --git a/src/stable/formatter.h b/src/stable/formatter.h index fc430f3..ea7fac4 100644 --- a/src/stable/formatter.h +++ b/src/stable/formatter.h @@ -273,14 +273,14 @@ namespace Bu Formatter &operator<<( Formatter &f, signed char c ); Formatter &operator<<( Formatter &f, char c ); Formatter &operator<<( Formatter &f, unsigned char c ); - Formatter &operator<<( Formatter &f, signed short i ); - Formatter &operator<<( Formatter &f, unsigned short i ); + Formatter &operator<<( Formatter &f, signed short int i ); + Formatter &operator<<( Formatter &f, unsigned short int i ); Formatter &operator<<( Formatter &f, signed int i ); Formatter &operator<<( Formatter &f, unsigned int i ); - Formatter &operator<<( Formatter &f, signed long i ); - Formatter &operator<<( Formatter &f, unsigned long i ); - Formatter &operator<<( Formatter &f, signed long long i ); - Formatter &operator<<( Formatter &f, unsigned long long i ); + Formatter &operator<<( Formatter &f, signed long int i ); + Formatter &operator<<( Formatter &f, unsigned long int i ); + Formatter &operator<<( Formatter &f, signed long long int i ); + Formatter &operator<<( Formatter &f, unsigned long long int i ); Formatter &operator<<( Formatter &f, float flt ); Formatter &operator<<( Formatter &f, double flt ); Formatter &operator<<( Formatter &f, long double flt ); @@ -290,14 +290,14 @@ namespace Bu Formatter &operator>>( Formatter &f, signed char &c ); Formatter &operator>>( Formatter &f, char &c ); Formatter &operator>>( Formatter &f, unsigned char &c ); - Formatter &operator>>( Formatter &f, signed short &i ); - Formatter &operator>>( Formatter &f, unsigned short &i ); + Formatter &operator>>( Formatter &f, signed short int &i ); + Formatter &operator>>( Formatter &f, unsigned short int &i ); Formatter &operator>>( Formatter &f, signed int &i ); Formatter &operator>>( Formatter &f, unsigned int &i ); - Formatter &operator>>( Formatter &f, signed long &i ); - Formatter &operator>>( Formatter &f, unsigned long &i ); - Formatter &operator>>( Formatter &f, signed long long &i ); - Formatter &operator>>( Formatter &f, unsigned long long &i ); + Formatter &operator>>( Formatter &f, signed long int &i ); + Formatter &operator>>( Formatter &f, unsigned long int &i ); + Formatter &operator>>( Formatter &f, signed long long int &i ); + Formatter &operator>>( Formatter &f, unsigned long long int &i ); Formatter &operator>>( Formatter &f, float &flt ); Formatter &operator>>( Formatter &f, double &flt ); Formatter &operator>>( Formatter &f, long double &flt ); diff --git a/src/stable/string.h b/src/stable/string.h index 54cd2bc..131f621 100644 --- a/src/stable/string.h +++ b/src/stable/string.h @@ -1077,4 +1077,6 @@ namespace Bu typedef Bu::List StringList; }; +#include "bu/formatter.h" + #endif diff --git a/src/unit/variant.unit b/src/unit/variant.unit index 97ff1f0..1105c94 100644 --- a/src/unit/variant.unit +++ b/src/unit/variant.unit @@ -57,5 +57,9 @@ suite Variant arg( i2, Fmt(2).fill('0') ); // sio << sio.nl << out << sio.nl; unitTest( out == "hello-stuff-32-00.odp" ); + + int64_t iBig = 159173777LL; + out = Bu::String("%1").arg( iBig ); + unitTest( out == "159173777" ); } } -- cgit v1.2.3