|
36 | 36 | #define CSFML_CHECK(object_) \
|
37 | 37 | do \
|
38 | 38 | { \
|
39 |
| - if (object_ == nullptr) \ |
| 39 | + if ((object_) == nullptr) \ |
40 | 40 | { \
|
41 | 41 | sf::err() << "SFML warning: trying to use a null " #object_ " object\n"; \
|
42 | 42 | return; \
|
|
49 | 49 | { \
|
50 | 50 | if (object_) \
|
51 | 51 | { \
|
52 |
| - (object_->This.function_); \ |
| 52 | + ((object_)->This.function_); \ |
53 | 53 | } \
|
54 | 54 | else \
|
55 | 55 | { \
|
|
63 | 63 | { \
|
64 | 64 | if (object_) \
|
65 | 65 | { \
|
66 |
| - (object_->This->function_); \ |
| 66 | + ((object_)->This->function_); \ |
67 | 67 | } \
|
68 | 68 | else \
|
69 | 69 | { \
|
|
75 | 75 | #define CSFML_CHECK_RETURN(object_, default_) \
|
76 | 76 | do \
|
77 | 77 | { \
|
78 |
| - if (object_ == nullptr) \ |
| 78 | + if ((object_) == nullptr) \ |
79 | 79 | { \
|
80 | 80 | sf::err() << "SFML warning: trying to use a null " #object_ " object\n"; \
|
81 | 81 | return default_; \
|
|
86 | 86 | #define CSFML_CALL_RETURN(object_, function_, default_) \
|
87 | 87 | if (object_) \
|
88 | 88 | { \
|
89 |
| - return (object_->This.function_); \ |
| 89 | + return ((object_)->This.function_); \ |
90 | 90 | } \
|
91 | 91 | else \
|
92 | 92 | { \
|
|
97 | 97 | #define CSFML_CALL_PTR_RETURN(object_, function_, default_) \
|
98 | 98 | if (object_) \
|
99 | 99 | { \
|
100 |
| - return (object_->This->function_); \ |
| 100 | + return ((object_)->This->function_); \ |
101 | 101 | } \
|
102 | 102 | else \
|
103 | 103 | { \
|
|
110 | 110 | #define CSFML_CHECK(object_)
|
111 | 111 |
|
112 | 112 | #define CSFML_CALL(object_, function_) \
|
113 |
| - (object_->This.function_) |
| 113 | + ((object_)->This.function_) |
114 | 114 |
|
115 | 115 | #define CSFML_CALL_PTR(object_, function_) \
|
116 |
| - (object_->This->function_) |
| 116 | + ((object_)->This->function_) |
117 | 117 |
|
118 | 118 | #define CSFML_CHECK_RETURN(object_, default_) \
|
119 |
| - (void)default_; |
| 119 | + (void)(default_); |
120 | 120 |
|
121 | 121 | #define CSFML_CALL_RETURN(object_, function_, default_) \
|
122 | 122 | { \
|
123 |
| - (void)default_; \ |
124 |
| - return (object_->This.function_); \ |
| 123 | + (void)(default_); \ |
| 124 | + return ((object_)->This.function_); \ |
125 | 125 | }
|
126 | 126 |
|
127 | 127 | #define CSFML_CALL_PTR_RETURN(object_, function_, default_) \
|
128 | 128 | { \
|
129 |
| - (void)default_; \ |
130 |
| - return (object_->This->function_); \ |
| 129 | + (void)(default_); \ |
| 130 | + return ((object_)->This->function_); \ |
131 | 131 | }
|
132 | 132 |
|
133 | 133 | #endif
|
|
0 commit comments