Skip to content

Commit 26d0b0a

Browse files
committed
Use std::size_t when referring to object size
1 parent 7d55b72 commit 26d0b0a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/ansi-c/literals/convert_integer_literal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ exprt convert_integer_literal(const std::string &src)
110110
((signed?!is_unsigned:(is_unsigned || is_hex_or_oct_or_bin)) && \
111111
(power(2, signed?width-1:width)>value_abs))
112112

113-
unsigned width;
113+
std::size_t width;
114114
bool is_signed=false;
115115
irep_idt c_type;
116116

src/big-int/bigint.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ BigInt::digits (onedig_t b) const
561561

562562

563563
char *
564-
BigInt::as_string (char *p, unsigned l, onedig_t b) const
564+
BigInt::as_string(char *p, std::size_t l, onedig_t b) const
565565
{
566566
if (l < 2)
567567
return 0; // Not enough room for number.
@@ -615,9 +615,9 @@ BigInt::dump (unsigned char *p, unsigned n)
615615
}
616616
// Determine number m of characters needed.
617617
onedig_t d = *--t;
618-
unsigned i = sizeof (onedig_t);
618+
std::size_t i = sizeof (onedig_t);
619619
while (--i && (d >> i * CHAR_BIT) == 0);
620-
unsigned m = ++i + (t - digit) * sizeof (onedig_t);
620+
std::size_t m = ++i + (t - digit) * sizeof (onedig_t);
621621
// Fill in leading zeroes.
622622
if (m > n)
623623
{

src/big-int/bigint.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public:
187187

188188
// Convert into string, right adjusted in field of specified width.
189189
// Returns pointer to start of number or NULL if field too small.
190-
char *as_string (char *, unsigned, onedig_t = 10) const _fasta;
190+
char *as_string(char *, std::size_t, onedig_t = 10) const _fasta;
191191

192192
// Convert to/from a binary representation.
193193

0 commit comments

Comments
 (0)