Skip to content

Commit

Permalink
impr: Make WorkspaceManager internals static
Browse files Browse the repository at this point in the history
  • Loading branch information
WerWolv committed Feb 1, 2025
1 parent 8039ae1 commit 483468a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/libimhex/source/api/workspace_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

namespace hex {

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();
static AutoReset<std::map<std::string, WorkspaceManager::Workspace>> s_workspaces;
static decltype(s_workspaces)::Type::iterator s_currentWorkspace = s_workspaces->end();
static decltype(s_workspaces)::Type::iterator s_previousWorkspace = s_workspaces->end();
static 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 {
Expand Down

0 comments on commit 483468a

Please sign in to comment.