Creating a variable inside an if statement (C++17)

This commit is contained in:
KaidoRen 2019-05-14 16:59:54 +05:00
parent 793a122af9
commit 835e0bc6c4

View File

@ -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);
}