From 835e0bc6c413f11b1bbf964daea87b57f653f5d7 Mon Sep 17 00:00:00 2001 From: KaidoRen Date: Tue, 14 May 2019 16:59:54 +0500 Subject: [PATCH] Creating a variable inside an if statement (C++17) --- amxmodx/srvcmd.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/amxmodx/srvcmd.cpp b/amxmodx/srvcmd.cpp index 003184d7..d109df47 100755 --- a/amxmodx/srvcmd.cpp +++ b/amxmodx/srvcmd.cpp @@ -82,8 +82,7 @@ void amx_command() print_srvconsole(" Author: %s\n", plugin->getAuthor()); print_srvconsole(" URL: %s\n", plugin->getUrl()); - auto description = plugin->getDescription(); - if (description[0] != '\0') + if (auto description = plugin->getDescription(); description[0]) { print_srvconsole(" Description: %s\n", description); }