diff --git a/ASTNode.cpp b/ASTNode.cpp index 6959d6adc..b93a405ca 100644 --- a/ASTNode.cpp +++ b/ASTNode.cpp @@ -11,7 +11,7 @@ void ASTNodeList::removeLast() void ASTNodeList::removeFirst() { - m_nodes.erase(m_nodes.cbegin()); + m_nodes.erase(m_nodes.begin()); } diff --git a/ASTree.cpp b/ASTree.cpp index 0f8ca3b5d..c58b7be0a 100644 --- a/ASTree.cpp +++ b/ASTree.cpp @@ -34,7 +34,7 @@ static bool printClassDocstring = true; // shortcut for all top/pop calls static PycRef StackPopTop(FastStack& stack) { - const auto node{ stack.top() }; + const auto node(stack.top()); stack.pop(); return node; } diff --git a/CMakeLists.txt b/CMakeLists.txt index b2dd5dae5..4dda56b90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ if (ENABLE_STACK_DEBUG) endif() if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") - set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wshadow -Werror ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-error=shadow -Werror ${CMAKE_CXX_FLAGS}") elseif(MSVC) set(CMAKE_CXX_FLAGS "/WX ${CMAKE_CXX_FLAGS}") add_definitions(-D_CRT_SECURE_NO_WARNINGS)