|
39 | 39 | */
|
40 | 40 | #define GECODE_POST \
|
41 | 41 | if (home.failed()) return; \
|
42 |
| - ::Gecode::PostInfo __gecode__pi(home); |
| 42 | + ::Gecode::PostInfo gecode_pi_(home); |
43 | 43 |
|
44 | 44 |
|
45 | 45 | /**
|
|
61 | 61 | * or the commit member function of a brancher.
|
62 | 62 | * \ingroup TaskActor
|
63 | 63 | */
|
64 |
| -#define GECODE_ME_CHECK_MODIFIED(modified, me) do { \ |
65 |
| - ::Gecode::ModEvent __me__ ## __LINE__ = (me); \ |
66 |
| - if (::Gecode::me_failed(__me__ ## __LINE__)) \ |
67 |
| - return ::Gecode::ES_FAILED; \ |
68 |
| - modified |= ::Gecode::me_modified(__me__ ## __LINE__); \ |
| 64 | +#define GECODE_ME_CHECK_MODIFIED(modified, me) do { \ |
| 65 | + ::Gecode::ModEvent gecode_me_ ## __LINE__ = (me); \ |
| 66 | + if (::Gecode::me_failed(gecode_me_ ## __LINE__)) \ |
| 67 | + return ::Gecode::ES_FAILED; \ |
| 68 | + modified |= ::Gecode::me_modified(gecode_me_ ## __LINE__); \ |
69 | 69 | } while (0)
|
70 | 70 |
|
71 | 71 | /**
|
|
74 | 74 | * To be used inside post functions.
|
75 | 75 | * \ingroup TaskActor
|
76 | 76 | */
|
77 |
| -#define GECODE_ME_FAIL(me) do { \ |
78 |
| - if (::Gecode::me_failed(me)) { \ |
79 |
| - (home).fail(); \ |
80 |
| - return; \ |
| 77 | +#define GECODE_ME_FAIL(me) do { \ |
| 78 | + if (::Gecode::me_failed(me)) { \ |
| 79 | + (home).fail(); \ |
| 80 | + return; \ |
81 | 81 | }} while (0)
|
82 | 82 |
|
83 | 83 |
|
|
89 | 89 | * \ingroup TaskActor
|
90 | 90 | */
|
91 | 91 | #define GECODE_ES_CHECK(es) do { \
|
92 |
| - ::Gecode::ExecStatus __es__ ## __LINE__ = (es); \ |
93 |
| - if (__es__ ## __LINE__ < ::Gecode::ES_OK) \ |
94 |
| - return __es__ ## __LINE__; \ |
| 92 | + ::Gecode::ExecStatus gecode_es_ ## __LINE__ = (es); \ |
| 93 | + if (gecode_es_ ## __LINE__ < ::Gecode::ES_OK) \ |
| 94 | + return gecode_es_ ## __LINE__; \ |
95 | 95 | } while (0)
|
96 | 96 |
|
97 | 97 | /**
|
|
101 | 101 | * \ingroup TaskActor
|
102 | 102 | */
|
103 | 103 | #define GECODE_ES_FAIL(es) do { \
|
104 |
| - ::Gecode::ExecStatus __es__ ## __LINE__ = (es); \ |
105 |
| - assert(__es__ ## __LINE__ != ::Gecode::__ES_SUBSUMED); \ |
106 |
| - if (__es__ ## __LINE__ < ::Gecode::ES_OK) { \ |
| 104 | + ::Gecode::ExecStatus gecode_es_ ## __LINE__ = (es); \ |
| 105 | + assert(gecode_es_ ## __LINE__ != ::Gecode::ES_SUBSUMED_); \ |
| 106 | + if (gecode_es_ ## __LINE__ < ::Gecode::ES_OK) { \ |
107 | 107 | (home).fail(); return; \
|
108 | 108 | } \
|
109 | 109 | } while (0)
|
|
113 | 113 | *
|
114 | 114 | * \ingroup TaskActor
|
115 | 115 | */
|
116 |
| -#define GECODE_REWRITE(prop,post) do { \ |
117 |
| - ::Gecode::Propagator& __p__ ## __LINE__ = (prop); \ |
118 |
| - size_t __s__ ## __LINE__ = __p__ ## __LINE__.dispose(home); \ |
119 |
| - ::Gecode::ExecStatus __es__ ## __LINE__ = (post); \ |
120 |
| - if (__es__ ## __LINE__ != ::Gecode::ES_OK) \ |
121 |
| - return ::Gecode::ES_FAILED; \ |
122 |
| - return home.ES_SUBSUMED_DISPOSED(__p__ ## __LINE__,__s__ ## __LINE__); \ |
| 116 | +#define GECODE_REWRITE(prop,post) do { \ |
| 117 | + ::Gecode::Propagator& gecode_p_ ## __LINE__ = (prop); \ |
| 118 | + size_t gecode_s_ ## __LINE__ = gecode_p_ ## __LINE__.dispose(home); \ |
| 119 | + ::Gecode::ExecStatus gecode_es_ ## __LINE__ = (post); \ |
| 120 | + if (gecode_es_ ## __LINE__ != ::Gecode::ES_OK) \ |
| 121 | + return ::Gecode::ES_FAILED; \ |
| 122 | + return home.ES_SUBSUMED_DISPOSED(gecode_p_ ## __LINE__, gecode_s_ ## __LINE__); \ |
123 | 123 | } while (0)
|
124 | 124 |
|
125 | 125 | // STATISTICS: kernel-other
|
0 commit comments