Skip to content

Commit 5068019

Browse files
committed
use std::size_t
1 parent 139fb51 commit 5068019

File tree

7 files changed

+32
-9
lines changed

7 files changed

+32
-9
lines changed

src/ansi-c/literals/unescape_string.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ Function: hex_to_unsigned
267267
268268
\*******************************************************************/
269269

270-
unsigned hex_to_unsigned(const char *hex, unsigned digits)
270+
unsigned hex_to_unsigned(const char *hex, std::size_t digits)
271271
{
272272
unsigned value=0;
273273

@@ -301,7 +301,7 @@ Function: octal_to_unsigned
301301
302302
\*******************************************************************/
303303

304-
unsigned octal_to_unsigned(const char *octal, unsigned digits)
304+
unsigned octal_to_unsigned(const char *octal, std::size_t digits)
305305
{
306306
unsigned value=0;
307307

src/ansi-c/literals/unescape_string.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Author: Daniel Kroening, kroening@kroening.com
1414
std::string unescape_string(const std::string &);
1515
std::basic_string<unsigned int> unescape_wide_string(const std::string &);
1616

17-
unsigned hex_to_unsigned(const char *, unsigned digits);
18-
unsigned octal_to_unsigned(const char *, unsigned digits);
17+
unsigned hex_to_unsigned(const char *, std::size_t digits);
18+
unsigned octal_to_unsigned(const char *, std::size_t digits);
1919

2020
#endif

src/goto-programs/goto_convert_exceptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void goto_convertt::convert_msc_leave(
112112
}
113113

114114
// need to process destructor stack
115-
for(unsigned d=targets.destructor_stack.size();
115+
for(std::size_t d=targets.destructor_stack.size();
116116
d!=targets.leave_stack_size;
117117
d--)
118118
{

src/goto-programs/remove_skip.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void remove_skip(goto_programt &goto_program)
9090
{
9191
// This needs to be a fixed-point, as
9292
// removing a skip can turn a goto into a skip.
93-
unsigned old_size;
93+
std::size_t old_size;
9494

9595
do
9696
{

src/util/fixedbv.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ class fixedbv_typet;
1818
class fixedbv_spect
1919
{
2020
public:
21-
unsigned integer_bits, width;
21+
std::size_t integer_bits, width;
2222

2323
fixedbv_spect():integer_bits(0), width(0)
2424
{
2525
}
2626

27-
fixedbv_spect(unsigned _width, unsigned _integer_bits):
27+
fixedbv_spect(std::size_t _width, std::size_t _integer_bits):
2828
integer_bits(_integer_bits), width(_width)
2929
{
3030
}
3131

3232
fixedbv_spect(const fixedbv_typet &type);
3333

34-
inline unsigned get_fraction_bits() const
34+
inline std::size_t get_fraction_bits() const
3535
{
3636
return width-integer_bits;
3737
}

src/util/xml.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,25 @@ Function: xmlt::set_attribute
296296
297297
\*******************************************************************/
298298

299+
void xmlt::set_attribute(
300+
const std::string &attribute,
301+
unsigned long value)
302+
{
303+
set_attribute(attribute, i2string(value));
304+
}
305+
306+
/*******************************************************************\
307+
308+
Function: xmlt::set_attribute
309+
310+
Inputs:
311+
312+
Outputs:
313+
314+
Purpose:
315+
316+
\*******************************************************************/
317+
299318
void xmlt::set_attribute(
300319
const std::string &attribute,
301320
const std::string &value)

src/util/xml.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ class xmlt
4343
const std::string &attribute,
4444
unsigned value);
4545

46+
void set_attribute(
47+
const std::string &attribute,
48+
unsigned long value);
49+
4650
void set_attribute(
4751
const std::string &attribute,
4852
const std::string &value);

0 commit comments

Comments
 (0)