diff --git a/CMakeLists.txt b/CMakeLists.txt index 696c1ca..eaa5e97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,9 @@ endif() if (${IS_GNU} OR ${IS_CLANG}) if (NOT MINGW) + if (CMAKE_VERSION STREQUAL "3.22.0") + message(WARNING "CMake ${CMAKE_VERSION} does not support mingw cross-compilers") + endif() include(FindOpenMP) if (OpenMP_CXX_FOUND) set(CMAKE_CXX_FLAGS "${OpenMP_CXX_FLAGS} ${CMAKE_CXX_FLAGS}") diff --git a/src/etc/lexer.cpp b/src/etc/lexer.cpp index 4f92e63..4f01473 100644 --- a/src/etc/lexer.cpp +++ b/src/etc/lexer.cpp @@ -19,7 +19,7 @@ vector lex(const string& in) switch (current) { case DIVIDE: if (in[i + 1] == current) i += 2; else goto insertToken; case TAG: { - if ((current == TAG && in[i + 1] == DEFINE)) { // See the IDENTIFIER case in Parser.hpp + if (current == TAG && in[i + 1] == DEFINE) { // See the IDENTIFIER case in Parser.hpp goto insertToken; } else { while (not (in[i + 1] == EOF_ || in[i + 1] == '\n')) { @@ -29,7 +29,7 @@ vector lex(const string& in) } } case ASTERISK: { - if ((in.size() - i) > 2 && in[i + 1] == ASTERISK) { + if (in[i + 1] == ASTERISK) { i += 2; try { while (not (in.at(i) == ASTERISK && in.at(i + 1) == ASTERISK)) {