diff --git a/plugins/debuggercommon/registers/registercontroller_arm.cpp b/plugins/debuggercommon/registers/registercontroller_arm.cpp --- a/plugins/debuggercommon/registers/registercontroller_arm.cpp +++ b/plugins/debuggercommon/registers/registercontroller_arm.cpp @@ -112,17 +112,11 @@ { if (m_registerNames.isEmpty()) { const int registerCount = static_cast(LAST_REGISTER); - m_registerNames.reserve(registerCount); - for (int i = 0; i < registerCount; ++i) { - m_registerNames.append(QStringList()); - } + m_registerNames.resize(registerCount); initRegisterNames(); } - int n = 0; - while (n++ < namesOfRegisterGroups().size()) { - m_formatsModes.append(FormatsModes()); - } + m_formatsModes.resize(namesOfRegisterGroups().size()); m_formatsModes[VFP_double].formats.append(Binary); m_formatsModes[VFP_double].formats.append(Decimal); diff --git a/plugins/debuggercommon/registers/registercontroller_x86.cpp b/plugins/debuggercommon/registers/registercontroller_x86.cpp --- a/plugins/debuggercommon/registers/registercontroller_x86.cpp +++ b/plugins/debuggercommon/registers/registercontroller_x86.cpp @@ -125,17 +125,11 @@ { if (m_registerNames.isEmpty()) { const int registerCount = static_cast(LAST_REGISTER); - m_registerNames.reserve(registerCount); - for (int i = 0; i < registerCount; ++i) { - m_registerNames.append(QStringList()); - } + m_registerNames.resize(registerCount); initRegisterNames(); } - int n = 0; - while (n++ < namesOfRegisterGroups().size()) { - m_formatsModes.append(FormatsModes()); - } + m_formatsModes.resize(namesOfRegisterGroups().size()); m_formatsModes[XMM].formats.append(Binary); m_formatsModes[XMM].formats.append(Decimal);