From 4e1a74e03ec068d070c85385caf1a392e5328aa3 Mon Sep 17 00:00:00 2001 From: William JCM Date: Fri, 2 Oct 2020 12:54:38 +0200 Subject: [PATCH] MainFrame: make code a bit more readable. --- GUI/EvtMainFrame.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/GUI/EvtMainFrame.cpp b/GUI/EvtMainFrame.cpp index 1173681..d870073 100644 --- a/GUI/EvtMainFrame.cpp +++ b/GUI/EvtMainFrame.cpp @@ -515,8 +515,9 @@ void EvtMainFrame::screenshotFileEventHandler(int event_type, const wxString& ev } void EvtMainFrame::updateProfileStats() { - _companyName->SetLabel(_profileManager.currentProfile()->companyName()); - _credits->SetLabel(wxString::Format("%i", _profileManager.currentProfile()->getCredits())); + Profile* current_profile = _profileManager.currentProfile(); + _companyName->SetLabel(current_profile->companyName()); + _credits->SetLabel(wxString::Format("%i", current_profile->getCredits())); } void EvtMainFrame::initialiseListView() {