Fix warnings and compilation on clang

This commit is contained in:
Thomas Krijnen
2018-12-22 14:05:49 +01:00
parent 99b865bbd9
commit 161deeb4e0
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -413,9 +413,11 @@ IF(MSVC)
ENDIF()
ENDFOREACH()
ElSE()
add_definitions(-Wall -Wextra -Wno-maybe-uninitialized)
add_definitions(-Wall -Wextra)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_definitions(-Wno-tautological-constant-out-of-range-compare)
else()
add_definitions(-Wno-maybe-uninitialized)
endif()
# -fPIC is not relevant on Windows and creates pointless warnings
if (UNIX)
+3 -1
View File
@@ -62,7 +62,9 @@ public:
}
bool operator!=(const type_iterator& other) const {
return entities_by_type_t::const_iterator::operator!=(other);
const entities_by_type_t::const_iterator& self_ = *this;
const entities_by_type_t::const_iterator& other_ = other;
return self_ != other_;
}
};