File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 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)
4242 if (s<=0 )
4343 return ;
4444
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);
4646 map.reserve (new_size);
4747
4848 for (std::size_t i=map.size (); i<new_size; ++i)
@@ -66,7 +66,8 @@ void endianness_mapt::build_big_endian(const typet &src)
6666 mp_integer bits=pointer_offset_bits (src, ns); // error is -1
6767 CHECK_RETURN (bits>=0 );
6868
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 ();
7071
7172 for (size_t bit=0 ; bit<bits_int; bit++)
7273 {
@@ -123,7 +124,7 @@ void endianness_mapt::build_big_endian(const typet &src)
123124 if (s<=0 )
124125 return ;
125126
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);
127128 map.reserve (new_size);
128129
129130 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
198198 // pad with zeros from the front, if needed
199199 while (mp_integer (tmp.size ())<=position) tmp=" 0" +tmp;
200200
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);
202203 result+=std::string (tmp, 0 , dot)+' .' ;
203204 result+=std::string (tmp, dot, std::string::npos);
204205
You can’t perform that action at this time.
0 commit comments