From ac964644be046cbe21588e0128fd4132705c1df1 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 7 Apr 2016 13:30:57 +0200 Subject: [PATCH] Move variable declaration to top --- MMDVMHost.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MMDVMHost.cpp b/MMDVMHost.cpp index 2414af6..0c57e1a 100644 --- a/MMDVMHost.cpp +++ b/MMDVMHost.cpp @@ -617,6 +617,8 @@ void CMMDVMHost::setMode(unsigned char mode, bool logging) assert(m_modem != NULL); assert(m_display != NULL); + std::string callsign = m_conf.getCallsign(); + switch (mode) { case MODE_DSTAR: if (logging) @@ -692,7 +694,6 @@ void CMMDVMHost::setMode(unsigned char mode, bool logging) if (m_mode == MODE_DMR && m_duplex) m_modem->writeDMRStart(false); m_modem->setMode(MODE_IDLE); - std::string callsign = m_conf.getCallsign(); m_display->setIdle(callsign.c_str()); m_mode = MODE_IDLE; m_modeTimer.stop();