File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55#define REACT_END }
66#define REACT ::react
77
8- #define REACT_IMPL_BEGIN REACT_BEGIN namespace impl {
8+ #define REACT_IMPL_BEGIN REACT_BEGIN namespace impl {
99#define REACT_IMPL_END REACT_END }
1010#define REACT_IMPL REACT ::impl
1111
12+ #ifdef _DEBUG
13+ #define REACT_MESSAGE (...) printf(__VA_ARGS__ ## "\n")
14+ #else
15+ #define REACT_MESSAGE
16+ #endif
17+
18+ // Assert with message
19+ #define REACT_ASSERT (condition , ...) for (; !(condition); assert(condition)) printf(__VA_ARGS__ ## "\n")
20+
1221////////////////////////////////////////////////////////////////////////////////////////
22+ // Type aliases
1323REACT_BEGIN
1424
15- typedef unsigned int uint ;
16- typedef unsigned char uchar ;
25+ using uint = unsigned int ;
26+ using uchar = unsigned char ;
1727
1828REACT_END
Original file line number Diff line number Diff line change 11#pragma once
22
3+ #include " react/Defs.h"
4+
35#include < mutex>
46#include < condition_variable>
57
6- namespace react {
8+ REACT_BEGIN
79
810class BlockingCondition
911{
@@ -70,4 +72,4 @@ class BlockingCondition
7072 bool blocked_ = false ;
7173};
7274
73- } // ~namespace react
75+ REACT_END
Original file line number Diff line number Diff line change 11#pragma once
22
3- #include < vector >
4- # include < array >
3+ #include " react/Defs.h "
4+
55#include < algorithm>
6+ #include < array>
7+ #include < vector>
68
79// //////////////////////////////////////////////////////////////////////////////////////
8- namespace react {
10+ REACT_BEGIN
911
1012// //////////////////////////////////////////////////////////////////////////////////////
1113// / NodeVector
@@ -80,4 +82,4 @@ class NodePtrBuffer
8082 DataT nodes_;
8183};
8284
83- } // ~namespace react
85+ REACT_END
Original file line number Diff line number Diff line change 11#pragma once
22
3+ #include " react/Defs.h"
4+
35#include < algorithm>
46#include < vector>
57
68#include " tbb/queuing_mutex.h"
79
810// //////////////////////////////////////////////////////////////////////////////////////
9- namespace react {
11+ REACT_BEGIN
1012
1113// //////////////////////////////////////////////////////////////////////////////////////
1214// / SourceIdSet
@@ -120,4 +122,4 @@ class SourceIdSet
120122 }
121123};
122124
123- } // ~namespace react
125+ REACT_END
Original file line number Diff line number Diff line change 11#pragma once
22
3+ #include " react/Defs.h"
4+
35#include < algorithm>
46#include < array>
57#include < vector>
68
79// //////////////////////////////////////////////////////////////////////////////////////
8- namespace react {
10+ REACT_BEGIN
911
1012// //////////////////////////////////////////////////////////////////////////////////////
1113// / TopoQueue
@@ -50,4 +52,4 @@ class TopoQueue
5052 std::vector<T*> data_;
5153};
5254
53- } // ~namespace react
55+ REACT_END
Original file line number Diff line number Diff line change 11#pragma once
22
3+ #include " react/Defs.h"
4+
35#include < assert.h>
46#include < cstddef>
57#include < ctime>
1113#include < utility>
1214
1315// //////////////////////////////////////////////////////////////////////////////////////
14- namespace react {
15-
16- #ifdef _DEBUG
17- #define REACT_MESSAGE (...) printf(__VA_ARGS__ ## " \n " )
18- #else
19- #define MESSAGE
20- #endif
21-
22- // Assert with message
23- #define REACT_ASSERT (condition, ...) for (; !(condition); assert (condition)) printf(__VA_ARGS__ ## " \n " )
16+ REACT_BEGIN
2417
2518// //////////////////////////////////////////////////////////////////////////////////////
2619// / NonCopyable
@@ -147,5 +140,4 @@ struct Identity
147140 typedef T Type;
148141};
149142
150- // ---
151- }
143+ REACT_END
You can’t perform that action at this time.
0 commit comments