Skip to content

Commit aef48c2

Browse files
committed
Avoid implicit cast int -> bool
Visual Studio warns: warning C4800: 'unsigned __int64' : forcing value to bool 'true' or 'false' (performance warning)
1 parent 9160e99 commit aef48c2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/goto-programs/goto_model.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ class goto_modelt : public abstract_goto_modelt
9292

9393
bool can_produce_function(const irep_idt &id) const override
9494
{
95-
return goto_functions.function_map.count(id);
95+
return goto_functions.function_map.find(id) !=
96+
goto_functions.function_map.end();
9697
}
9798
};
9899

@@ -127,7 +128,8 @@ class wrapper_goto_modelt : public abstract_goto_modelt
127128

128129
bool can_produce_function(const irep_idt &id) const override
129130
{
130-
return goto_functions.function_map.count(id);
131+
return goto_functions.function_map.find(id) !=
132+
goto_functions.function_map.end();
131133
}
132134

133135
private:

0 commit comments

Comments
 (0)