X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FForeach.h;h=5cc075c7e6aeeeeeb4a476a091da42bfa72e734a;hb=9783dc4e7cfa938f1c33666ec0a31c204dff60ed;hp=f95274f1de18eee2a0620fd38f02e875f035aa80;hpb=1dee6ec97e5608698324284582257b68252881a6;p=folly.git diff --git a/folly/Foreach.h b/folly/Foreach.h index f95274f1..5cc075c7 100644 --- a/folly/Foreach.h +++ b/folly/Foreach.h @@ -1,5 +1,5 @@ /* - * Copyright 2016 Facebook, Inc. + * Copyright 2017 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -88,13 +88,13 @@ * } */ #define FOR_EACH_ENUMERATE(count, i, c) \ - if (bool FOR_EACH_state1 = false) {} else \ + if (bool _FE_ANON(s1_) = false) {} else \ for (auto && FOR_EACH_state2 = (c); \ - !FOR_EACH_state1; FOR_EACH_state1 = true) \ - if (size_t FOR_EACH_privateCount = 0) {} else \ - if (const size_t& count = FOR_EACH_privateCount) {} else \ + !_FE_ANON(s1_); _FE_ANON(s1_) = true) \ + if (size_t _FE_ANON(n1_) = 0) {} else \ + if (const size_t& count = _FE_ANON(n1_)) {} else \ for (auto i = FOR_EACH_state2.begin(); \ - i != FOR_EACH_state2.end(); ++FOR_EACH_privateCount, ++i) + i != FOR_EACH_state2.end(); ++_FE_ANON(n1_), ++i) /** * Similar to FOR_EACH, but gives the user the key and value for each entry in