diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-16 16:02:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-16 16:02:06 +0200 |
commit | c76ff457079bf5901a6bb55377c14aeee856a354 (patch) | |
tree | 6a7d0c7606370b54fa77369dd101d035aad08918 /build2/test | |
parent | 20677fb264e743b8e5423af31a7d8dc06cf509f6 (diff) |
Cleanup variable typing
Diffstat (limited to 'build2/test')
-rw-r--r-- | build2/test/module.cxx | 12 | ||||
-rw-r--r-- | build2/test/rule.cxx | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/build2/test/module.cxx b/build2/test/module.cxx index c8c0fa7..10948ab 100644 --- a/build2/test/module.cxx +++ b/build2/test/module.cxx @@ -38,12 +38,12 @@ namespace build2 { auto& v (var_pool); - v.find ("test", bool_type); - v.find ("test.input", name_type); - v.find ("test.output", name_type); - v.find ("test.roundtrip", name_type); - v.find ("test.options", strings_type); - v.find ("test.arguments", strings_type); + v.find<bool> ("test"); + v.find<name> ("test.input"); + v.find<name> ("test.output"); + v.find<name> ("test.roundtrip"); + v.find<strings> ("test.options"); + v.find<strings> ("test.arguments"); } } diff --git a/build2/test/rule.cxx b/build2/test/rule.cxx index 39b7d01..efe265b 100644 --- a/build2/test/rule.cxx +++ b/build2/test/rule.cxx @@ -68,7 +68,7 @@ namespace build2 // if (!l.defined ()) l = t.base_scope ()[ - var_pool.find (string("test.") + t.type ().name, bool_type)]; + var_pool.find<bool> (string("test.") + t.type ().name)]; r = l && as<bool> (*l); } @@ -146,9 +146,9 @@ namespace build2 string n ("test."); n += t.type ().name; - const variable& in (var_pool.find (n + ".input", name_type)); - const variable& on (var_pool.find (n + ".output", name_type)); - const variable& rn (var_pool.find (n + ".roundtrip", name_type)); + const variable& in (var_pool.find<name> (n + ".input")); + const variable& on (var_pool.find<name> (n + ".output")); + const variable& rn (var_pool.find<name> (n + ".roundtrip")); // We should only keep value(s) that were specified together // in the innermost scope. @@ -292,7 +292,7 @@ namespace build2 var += t.type ().name; var += '.'; var += n; - l = t.base_scope ()[var_pool.find (var, strings_type)]; + l = t.base_scope ()[var_pool.find<strings> (var)]; } if (l) |