fix: Various invalid iterator and container accesses

This commit is contained in:
WerWolv
2023-01-01 01:01:24 +01:00
parent 921bdd9e3b
commit 87ed0d31d4
8 changed files with 11 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.16)
project(libimhex)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD 23)
set(BUILD_SHARED_LIBS OFF)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../external/imgui ${CMAKE_CURRENT_BINARY_DIR}/external/imgui)

View File

@@ -80,7 +80,9 @@ namespace hex {
if (iter != s_tokenStore.end()) {
s_events.remove(*iter->second);
s_tokenStore.erase(iter);
}
}
template<typename E>

View File

@@ -189,7 +189,7 @@ namespace hex::fs {
#endif
}
constexpr std::vector<std::fs::path> appendPath(std::vector<std::fs::path> paths, const std::fs::path &folder) {
std::vector<std::fs::path> appendPath(std::vector<std::fs::path> paths, const std::fs::path &folder) {
for (auto &path : paths)
path = path / folder;