File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ void endianness_mapt::build_little_endian(const typet &src)
42
42
if (s<=0 )
43
43
return ;
44
44
45
- std::size_t new_size= map.size ()+ integer2size_t (s);
45
+ std::size_t new_size = map.size () + numeric_cast_v<std:: size_t > (s);
46
46
map.reserve (new_size);
47
47
48
48
for (std::size_t i=map.size (); i<new_size; ++i)
@@ -66,7 +66,8 @@ void endianness_mapt::build_big_endian(const typet &src)
66
66
mp_integer bits=pointer_offset_bits (src, ns); // error is -1
67
67
CHECK_RETURN (bits>=0 );
68
68
69
- size_t bits_int=integer2size_t (bits), base=map.size ();
69
+ const std::size_t bits_int = numeric_cast_v<std::size_t >(bits);
70
+ const std::size_t base = map.size ();
70
71
71
72
for (size_t bit=0 ; bit<bits_int; bit++)
72
73
{
@@ -123,7 +124,7 @@ void endianness_mapt::build_big_endian(const typet &src)
123
124
if (s<=0 )
124
125
return ;
125
126
126
- std::size_t new_size= map.size ()+ integer2size_t (s);
127
+ const std::size_t new_size = map.size () + numeric_cast_v<std:: size_t > (s);
127
128
map.reserve (new_size);
128
129
129
130
for (std::size_t i=map.size (); i<new_size; ++i)
Original file line number Diff line number Diff line change @@ -198,7 +198,8 @@ std::string ieee_floatt::to_string_decimal(std::size_t precision) const
198
198
// pad with zeros from the front, if needed
199
199
while (mp_integer (tmp.size ())<=position) tmp=" 0" +tmp;
200
200
201
- std::size_t dot=tmp.size ()-integer2size_t (position);
201
+ const std::size_t dot =
202
+ tmp.size () - numeric_cast_v<std::size_t >(position);
202
203
result+=std::string (tmp, 0 , dot)+' .' ;
203
204
result+=std::string (tmp, dot, std::string::npos);
204
205
You can’t perform that action at this time.
0 commit comments