Skip to content

Commit 2b0d2fe

Browse files
Strings-RHThePhD
authored andcommitted
Normalized the use of parenthesis when comparing a PreProcessor macro with 0
1 parent 469f14e commit 2b0d2fe

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

include/sol/version.hpp

+19-19
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
#define SOL_PLATFORM_BSDLIKE_I_ SOL_OFF
238238

239239
#if defined(SOL_IN_DEBUG_DETECTED)
240-
#if SOL_IN_DEBUG_DETECTED != 0
240+
#if (SOL_IN_DEBUG_DETECTED != 0)
241241
#define SOL_DEBUG_BUILD_I_ SOL_ON
242242
#else
243243
#define SOL_DEBUG_BUILD_I_ SOL_OFF
@@ -300,7 +300,7 @@
300300
#endif
301301

302302
#if defined(SOL_NO_THREAD_LOCAL)
303-
#if SOL_NO_THREAD_LOCAL != 0
303+
#if (SOL_NO_THREAD_LOCAL != 0)
304304
#define SOL_USE_THREAD_LOCAL_I_ SOL_OFF
305305
#else
306306
#define SOL_USE_THREAD_LOCAL_I_ SOL_ON
@@ -310,7 +310,7 @@
310310
#endif // thread_local keyword is bjorked on some platforms
311311

312312
#if defined(SOL_ALL_SAFETIES_ON)
313-
#if SOL_ALL_SAFETIES_ON != 0
313+
#if (SOL_ALL_SAFETIES_ON != 0)
314314
#define SOL_ALL_SAFETIES_ON_I_ SOL_ON
315315
#else
316316
#define SOL_ALL_SAFETIES_ON_I_ SOL_OFF
@@ -320,7 +320,7 @@
320320
#endif
321321

322322
#if defined(SOL_SAFE_GETTER)
323-
#if SOL_SAFE_GETTER != 0
323+
#if (SOL_SAFE_GETTER != 0)
324324
#define SOL_SAFE_GETTER_I_ SOL_ON
325325
#else
326326
#define SOL_SAFE_GETTER_I_ SOL_OFF
@@ -336,7 +336,7 @@
336336
#endif
337337

338338
#if defined(SOL_SAFE_USERTYPE)
339-
#if SOL_SAFE_USERTYPE != 0
339+
#if (SOL_SAFE_USERTYPE != 0)
340340
#define SOL_SAFE_USERTYPE_I_ SOL_ON
341341
#else
342342
#define SOL_SAFE_USERTYPE_I_ SOL_OFF
@@ -352,7 +352,7 @@
352352
#endif
353353

354354
#if defined(SOL_SAFE_REFERENCES)
355-
#if SOL_SAFE_REFERENCES != 0
355+
#if (SOL_SAFE_REFERENCES != 0)
356356
#define SOL_SAFE_REFERENCES_I_ SOL_ON
357357
#else
358358
#define SOL_SAFE_REFERENCES_I_ SOL_OFF
@@ -368,13 +368,13 @@
368368
#endif
369369

370370
#if defined(SOL_SAFE_FUNCTIONS)
371-
#if SOL_SAFE_FUNCTIONS != 0
371+
#if (SOL_SAFE_FUNCTIONS != 0)
372372
#define SOL_SAFE_FUNCTION_OBJECTS_I_ SOL_ON
373373
#else
374374
#define SOL_SAFE_FUNCTION_OBJECTS_I_ SOL_OFF
375375
#endif
376376
#elif defined (SOL_SAFE_FUNCTION_OBJECTS)
377-
#if SOL_SAFE_FUNCTION_OBJECTS != 0
377+
#if (SOL_SAFE_FUNCTION_OBJECTS != 0)
378378
#define SOL_SAFE_FUNCTION_OBJECTS_I_ SOL_ON
379379
#else
380380
#define SOL_SAFE_FUNCTION_OBJECTS_I_ SOL_OFF
@@ -390,7 +390,7 @@
390390
#endif
391391

392392
#if defined(SOL_SAFE_FUNCTION_CALLS)
393-
#if SOL_SAFE_FUNCTION_CALLS != 0
393+
#if (SOL_SAFE_FUNCTION_CALLS != 0)
394394
#define SOL_SAFE_FUNCTION_CALLS_I_ SOL_ON
395395
#else
396396
#define SOL_SAFE_FUNCTION_CALLS_I_ SOL_OFF
@@ -406,7 +406,7 @@
406406
#endif
407407

408408
#if defined(SOL_SAFE_PROXIES)
409-
#if SOL_SAFE_PROXIES != 0
409+
#if (SOL_SAFE_PROXIES != 0)
410410
#define SOL_SAFE_PROXIES_I_ SOL_ON
411411
#else
412412
#define SOL_SAFE_PROXIES_I_ SOL_OFF
@@ -422,7 +422,7 @@
422422
#endif
423423

424424
#if defined(SOL_SAFE_NUMERICS)
425-
#if SOL_SAFE_NUMERICS != 0
425+
#if (SOL_SAFE_NUMERICS != 0)
426426
#define SOL_SAFE_NUMERICS_I_ SOL_ON
427427
#else
428428
#define SOL_SAFE_NUMERICS_I_ SOL_OFF
@@ -452,7 +452,7 @@
452452
#endif
453453

454454
#if defined(SOL_SAFE_STACK_CHECK)
455-
#if SOL_SAFE_STACK_CHECK != 0
455+
#if (SOL_SAFE_STACK_CHECK != 0)
456456
#define SOL_SAFE_STACK_CHECK_I_ SOL_ON
457457
#else
458458
#define SOL_SAFE_STACK_CHECK_I_ SOL_OFF
@@ -468,13 +468,13 @@
468468
#endif
469469

470470
#if defined(SOL_NO_CHECK_NUMBER_PRECISION)
471-
#if SOL_NO_CHECK_NUMBER_PRECISION != 0
471+
#if (SOL_NO_CHECK_NUMBER_PRECISION != 0)
472472
#define SOL_NUMBER_PRECISION_CHECKS_I_ SOL_OFF
473473
#else
474474
#define SOL_NUMBER_PRECISION_CHECKS_I_ SOL_ON
475475
#endif
476476
#elif defined(SOL_NO_CHECKING_NUMBER_PRECISION)
477-
#if SOL_NO_CHECKING_NUMBER_PRECISION != 0
477+
#if (SOL_NO_CHECKING_NUMBER_PRECISION != 0)
478478
#define SOL_NUMBER_PRECISION_CHECKS_I_ SOL_OFF
479479
#else
480480
#define SOL_NUMBER_PRECISION_CHECKS_I_ SOL_ON
@@ -502,13 +502,13 @@
502502
#endif
503503

504504
#if defined(SOL_ENABLE_INTEROP)
505-
#if SOL_ENABLE_INTEROP != 0
505+
#if (SOL_ENABLE_INTEROP != 0)
506506
#define SOL_USE_INTEROP_I_ SOL_ON
507507
#else
508508
#define SOL_USE_INTEROP_I_ SOL_OFF
509509
#endif
510510
#elif defined(SOL_USE_INTEROP)
511-
#if SOL_USE_INTEROP != 0
511+
#if (SOL_USE_INTEROP != 0)
512512
#define SOL_USE_INTEROP_I_ SOL_ON
513513
#else
514514
#define SOL_USE_INTEROP_I_ SOL_OFF
@@ -598,19 +598,19 @@
598598
#endif
599599
#endif // noexcept is part of a function's type
600600

601-
#if defined(SOL_STACK_STRING_OPTIMIZATION_SIZE) && SOL_STACK_STRING_OPTIMIZATION_SIZE > 0
601+
#if defined(SOL_STACK_STRING_OPTIMIZATION_SIZE) && (SOL_STACK_STRING_OPTIMIZATION_SIZE > 0)
602602
#define SOL_OPTIMIZATION_STRING_CONVERSION_STACK_SIZE_I_ SOL_STACK_STRING_OPTIMIZATION_SIZE
603603
#else
604604
#define SOL_OPTIMIZATION_STRING_CONVERSION_STACK_SIZE_I_ 1024
605605
#endif
606606

607-
#if defined(SOL_ID_SIZE) && SOL_ID_SIZE > 0
607+
#if defined(SOL_ID_SIZE) && (SOL_ID_SIZE > 0)
608608
#define SOL_ID_SIZE_I_ SOL_ID_SIZE
609609
#else
610610
#define SOL_ID_SIZE_I_ 512
611611
#endif
612612

613-
#if defined(LUA_IDSIZE) && LUA_IDSIZE > 0
613+
#if defined(LUA_IDSIZE) && (LUA_IDSIZE > 0)
614614
#define SOL_FILE_ID_SIZE_I_ LUA_IDSIZE
615615
#elif defined(SOL_ID_SIZE) && SOL_ID_SIZE > 0
616616
#define SOL_FILE_ID_SIZE_I_ SOL_FILE_ID_SIZE

0 commit comments

Comments
 (0)