From b57ed8917a7aab606cfaffdf90fd8ad1bda0c587 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 24 May 2019 02:05:18 -0400 Subject: [PATCH] frontend/A32/types: Remove redundant std::string initializer std::string initializes to empty by default. While we're at it, brace a lone unbraced if statement. --- src/frontend/A32/types.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/A32/types.cpp b/src/frontend/A32/types.cpp index 49659293..54cb4a65 100644 --- a/src/frontend/A32/types.cpp +++ b/src/frontend/A32/types.cpp @@ -52,12 +52,13 @@ const char* CoprocRegToString(CoprocReg reg) { } std::string RegListToString(RegList reg_list) { - std::string ret = ""; + std::string ret; bool first_reg = true; for (size_t i = 0; i < 16; i++) { if (Common::Bit(i, reg_list)) { - if (!first_reg) + if (!first_reg) { ret += ", "; + } ret += RegToString(static_cast(i)); first_reg = false; }