@@ -23,13 +23,13 @@ taint_sett taint_sett::map_conditional(
23
23
}
24
24
25
25
template <class maptype , class keytype >
26
- void assert_has_keys (const maptype& m,
27
- const std::vector<keytype>& expected, const char * detail)
26
+ void throw_if_keyset_differs (const maptype & m,
27
+ const std::vector<keytype> & expected, const char * detail)
28
28
{
29
29
std::vector<keytype> keys;
30
- for (const auto & keyval : m)
30
+ for (const auto & keyval : m)
31
31
keys.push_back (keyval.first );
32
- std::sort (keys.begin (),keys.end ());
32
+ std::sort (keys.begin (), keys.end ());
33
33
if (keys != expected)
34
34
throw detail;
35
35
}
@@ -40,7 +40,7 @@ taint_sett taint_sett::from_json(const jsont& js)
40
40
assert (js.is_object ());
41
41
const auto & js_object=static_cast <const json_objectt&>(js);
42
42
// Check required keys are provided
43
- assert_has_keys (js.object ,
43
+ throw_if_keyset_differs (js.object ,
44
44
std::vector<std::string>({ " is_bottom" , " is_top" , " taints" }),
45
45
" JSON object is not an taint_sett" );
46
46
// Get the array of taint variables
0 commit comments