aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/scope.hxx22
1 files changed, 13 insertions, 9 deletions
diff --git a/libbuild2/scope.hxx b/libbuild2/scope.hxx
index e3ebdef..2df8f0a 100644
--- a/libbuild2/scope.hxx
+++ b/libbuild2/scope.hxx
@@ -443,15 +443,19 @@ namespace build2
for (size_t i (1), n (ms.size ()); i != n; ++i)
{
- // Skip a few well-known meta-operations that cannot possibly
- // trigger a rule match.
- //
- if (ms[i] != nullptr &&
- i != noop_id &&
- i != info_id &&
- i != create_id &&
- i != disfigure_id)
- rules.insert<T> (i, oid, hint, r);
+ if (ms[i] != nullptr)
+ {
+ // Skip a few well-known meta-operations that cannot possibly
+ // trigger a rule match.
+ //
+ mid = static_cast<meta_operation_id> (i);
+
+ if (mid != noop_id &&
+ mid != info_id &&
+ mid != create_id &&
+ mid != disfigure_id)
+ rules.insert<T> (mid, oid, hint, r);
+ }
}
}
}