ThePhD / sol2

Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
http://sol2.rtfd.io/
MIT License
4.06k stars 492 forks source link

Pre processor syntax error correction, and some simple code formatting #1598

Open Strings-RH opened 2 months ago

Strings-RH commented 2 months ago

There are a few syntax errors in include/version.hpp

#if defined(SOL_COMPILER_CLANG)
    #if defined(SOL_COMPILER_CLANG != 0)

which should be

#if defined(SOL_COMPILER_CLANG)
    #if (SOL_COMPILER_CLANG != 0)

Also, while reviewing the remainder of version.hpp, the use of parenthesis on the second condition when using this pattern is inconsistent, so I have normalized the formatting throughout the file.

#if defined(SOL_SAFE_GETTER)
    #if SOL_SAFE_GETTER != 0

becomes

#if defined(SOL_SAFE_GETTER)
    #if (SOL_SAFE_GETTER != 0)