From eacf7f7ccd40a56d1fe761d3d30ced6c6acd58da Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 1 Nov 2018 13:00:16 +0200 Subject: Add support for rule-specific variables, use to fix cc.type data race --- build2/action.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'build2/action.hxx') 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 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. -- cgit v1.1