build: Make ImHex fully compile with MSVC and Clang CL

This does NOT make ImHex work yet. However it can now be compiled
This commit is contained in:
WerWolv
2025-02-01 15:13:13 +01:00
parent 466b372d41
commit 8039ae1b90
18 changed files with 95 additions and 33 deletions

View File

@@ -14,10 +14,10 @@
namespace hex {
AutoReset<std::map<std::string, WorkspaceManager::Workspace>> WorkspaceManager::s_workspaces;
decltype(WorkspaceManager::s_workspaces)::Type::iterator WorkspaceManager::s_currentWorkspace = s_workspaces->end();
decltype(WorkspaceManager::s_workspaces)::Type::iterator WorkspaceManager::s_previousWorkspace = s_workspaces->end();
decltype(WorkspaceManager::s_workspaces)::Type::iterator WorkspaceManager::s_workspaceToRemove = s_workspaces->end();
AutoReset<std::map<std::string, WorkspaceManager::Workspace>> s_workspaces;
decltype(s_workspaces)::Type::iterator s_currentWorkspace = s_workspaces->end();
decltype(s_workspaces)::Type::iterator s_previousWorkspace = s_workspaces->end();
decltype(s_workspaces)::Type::iterator s_workspaceToRemove = s_workspaces->end();
void WorkspaceManager::createWorkspace(const std::string& name, const std::string &layout) {
s_currentWorkspace = s_workspaces->insert_or_assign(name, Workspace {
@@ -174,7 +174,13 @@ namespace hex {
}
}
const std::map<std::string, WorkspaceManager::Workspace>& WorkspaceManager::getWorkspaces() {
return *s_workspaces;
}
const std::map<std::string, WorkspaceManager::Workspace>::iterator& WorkspaceManager::getCurrentWorkspace() {
return s_currentWorkspace;
}
}