mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-03-27 04:49:06 +03:00
Creating a variable inside an if statement (C++17)
This commit is contained in:
parent
793a122af9
commit
835e0bc6c4
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user