Skip to content

Commit 77b7d77

Browse files
Change length argument type to size_t
1 parent 898f965 commit 77b7d77

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/solvers/refinement/string_constraint_generator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ exprt get_numeric_value_from_character(
373373

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

376-
std::string utf16_constant_array_to_java(
377-
const array_exprt &arr, unsigned length);
376+
std::string
377+
utf16_constant_array_to_java(const array_exprt &arr, std::size_t length);
378378

379379
#endif

src/solvers/refinement/string_constraint_generator_format.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,8 @@ exprt string_constraint_generatort::add_axioms_for_format(
417417
/// \param length: an unsigned value representing the length of the array
418418
/// \return String of length `length` represented by the array assuming each
419419
/// field in `arr` represents a character.
420-
std::string utf16_constant_array_to_java(
421-
const array_exprt &arr, unsigned int length)
420+
std::string
421+
utf16_constant_array_to_java(const array_exprt &arr, std::size_t length)
422422
{
423423
std::wstring out(length, '?');
424424
unsigned int c;

src/solvers/refinement/string_refinement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ static std::string string_of_array(const array_exprt &arr)
858858
return std::string("");
859859

860860
exprt size_expr=to_array_type(arr.type()).size();
861-
auto n = numeric_cast_v<unsigned>(size_expr);
861+
auto n = numeric_cast_v<std::size_t>(size_expr);
862862
return utf16_constant_array_to_java(arr, n);
863863
}
864864

0 commit comments

Comments
 (0)