From 4e183f215d95452ccc3cd126b0daa399ffe18aee Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Wed, 29 Dec 2021 23:04:37 +0100 Subject: [PATCH] Remove fancy code to generate section name --- DStarGatewayConfig.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DStarGatewayConfig.cpp b/DStarGatewayConfig.cpp index 8ee8ecd..6629bd7 100644 --- a/DStarGatewayConfig.cpp +++ b/DStarGatewayConfig.cpp @@ -153,7 +153,7 @@ bool CDStarGatewayConfig::loadPaths(const CConfig & cfg) bool CDStarGatewayConfig::loadRepeaters(const CConfig & cfg) { for(unsigned int i = 0; i < 4; i++) { - std::string section = ((std::stringstream() << "repeater_" << (i + 1))).str(); + std::string section = CStringUtils::string_format("repeater_%d", i+ 1); bool repeaterEnabled; bool ret = cfg.getValue(section, "enabled", repeaterEnabled, false); @@ -226,7 +226,7 @@ bool CDStarGatewayConfig::loadIrcDDB(const CConfig & cfg) { bool ret = true; for(unsigned int i = 0; i < 4; i++) { - std::string section = ((std::stringstream() << "ircddb_" << (i + 1))).str(); + std::string section = CStringUtils::string_format("ircddb_%d", i + 1); bool ircEnabled; ret = cfg.getValue(section, "enabled", ircEnabled, false) && ret;