diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-11-01 13:00:16 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-11-01 13:00:16 +0200 |
commit | eacf7f7ccd40a56d1fe761d3d30ced6c6acd58da (patch) | |
tree | 841a87d57720704654e8e8fa94cecd05c17b6cfa /build2/action.hxx | |
parent | 8ba507252cb932023d16e5d4dfef267c039feb78 (diff) |
Add support for rule-specific variables, use to fix cc.type data race
Diffstat (limited to 'build2/action.hxx')
-rw-r--r-- | build2/action.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/build2/action.hxx b/build2/action.hxx index 8c9b7e5..321d2c1 100644 --- a/build2/action.hxx +++ b/build2/action.hxx @@ -114,10 +114,10 @@ namespace build2 template <typename T> struct action_state { - T states[2]; // [0] -- inner, [1] -- outer. + T data[2]; // [0] -- inner, [1] -- outer. - T& operator[] (action a) {return states[a.inner () ? 0 : 1];} - const T& operator[] (action a) const {return states[a.inner () ? 0 : 1];} + T& operator[] (action a) {return data[a.inner () ? 0 : 1];} + const T& operator[] (action a) const {return data[a.inner () ? 0 : 1];} }; // Id constants for build-in and pre-defined meta/operations. |