Skip to content

Commit

Permalink
Change length argument type to size_t
Browse files Browse the repository at this point in the history
  • Loading branch information
romainbrenguier committed Dec 8, 2017
1 parent 898f965 commit 77b7d77
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/solvers/refinement/string_constraint_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ exprt get_numeric_value_from_character(

size_t max_printed_string_length(const typet &type, unsigned long ul_radix);

std::string utf16_constant_array_to_java(
const array_exprt &arr, unsigned length);
std::string
utf16_constant_array_to_java(const array_exprt &arr, std::size_t length);

#endif
4 changes: 2 additions & 2 deletions src/solvers/refinement/string_constraint_generator_format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@ exprt string_constraint_generatort::add_axioms_for_format(
/// \param length: an unsigned value representing the length of the array
/// \return String of length `length` represented by the array assuming each
/// field in `arr` represents a character.
std::string utf16_constant_array_to_java(
const array_exprt &arr, unsigned int length)
std::string
utf16_constant_array_to_java(const array_exprt &arr, std::size_t length)
{
std::wstring out(length, '?');
unsigned int c;
Expand Down
2 changes: 1 addition & 1 deletion src/solvers/refinement/string_refinement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ static std::string string_of_array(const array_exprt &arr)
return std::string("");

exprt size_expr=to_array_type(arr.type()).size();
auto n = numeric_cast_v<unsigned>(size_expr);
auto n = numeric_cast_v<std::size_t>(size_expr);
return utf16_constant_array_to_java(arr, n);
}

Expand Down

0 comments on commit 77b7d77

Please sign in to comment.