App::I static singleton to pointer

This commit is contained in:
2019-07-11 18:08:17 +02:00
parent 92dd00d910
commit b89274e7a6
33 changed files with 417 additions and 412 deletions

View File

@@ -11,7 +11,7 @@ void ActionManager::add(Action *action)
I.m_actions.emplace(action);
I.m_memory += action->memory();
//LOG("History: %.2f KB", I.m_memory / 1024.f);
App::I.update_memory_usage(I.m_memory);
App::I->update_memory_usage(I.m_memory);
}
void ActionManager::undo()
@@ -27,8 +27,8 @@ void ActionManager::undo()
Canvas::I->m_unsaved = !I.m_actions.top()->was_saved;
I.m_actions.pop();
//LOG("History: %.2f KB", I.m_memory / 1024.f);
App::I.update_memory_usage(I.m_memory);
App::I.title_update();
App::I->update_memory_usage(I.m_memory);
App::I->title_update();
}
void ActionManager::redo()
@@ -44,8 +44,8 @@ void ActionManager::redo()
Canvas::I->m_unsaved = !I.m_redos.top()->was_saved;
I.m_redos.pop();
//LOG("History: %.2f KB", I.m_memory / 1024.f);
App::I.update_memory_usage(I.m_memory);
App::I.title_update();
App::I->update_memory_usage(I.m_memory);
App::I->title_update();
}
void ActionManager::clear()
@@ -56,5 +56,5 @@ void ActionManager::clear()
I.m_redos.pop();
I.m_memory = 0;
//LOG("History: %.2f KB", I.m_memory / 1024.f);
App::I.update_memory_usage(I.m_memory);
App::I->update_memory_usage(I.m_memory);
}