Skip to content

Commit 8bc2048

Browse files
committed
use std::size_t for an instruction count
To avoid a narrowing cast, use std::size_t when copying a std::size_t pair member.
1 parent cfa04a3 commit 8bc2048

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/goto-symex/symex_goto.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,8 @@ static void merge_names(
742742
symex_target_equationt &target,
743743
const incremental_dirtyt &dirty,
744744
const ssa_exprt &ssa,
745-
const unsigned goto_count,
746-
const unsigned dest_count)
745+
const std::size_t goto_count,
746+
const std::size_t dest_count)
747747
{
748748
const irep_idt l1_identifier = ssa.get_identifier();
749749
const irep_idt &obj_identifier = ssa.get_object_name();
@@ -876,10 +876,10 @@ void goto_symext::phi_function(
876876
for(const auto &delta_item : delta_view)
877877
{
878878
const ssa_exprt &ssa = delta_item.m.first;
879-
unsigned goto_count = delta_item.m.second;
880-
unsigned dest_count = !delta_item.is_in_both_maps()
881-
? 0
882-
: delta_item.get_other_map_value().second;
879+
std::size_t goto_count = delta_item.m.second;
880+
std::size_t dest_count = !delta_item.is_in_both_maps()
881+
? 0
882+
: delta_item.get_other_map_value().second;
883883

884884
merge_names(
885885
goto_state,
@@ -905,8 +905,8 @@ void goto_symext::phi_function(
905905
continue;
906906

907907
const ssa_exprt &ssa = delta_item.m.first;
908-
unsigned goto_count = 0;
909-
unsigned dest_count = delta_item.m.second;
908+
std::size_t goto_count = 0;
909+
std::size_t dest_count = delta_item.m.second;
910910

911911
merge_names(
912912
goto_state,

0 commit comments

Comments
 (0)