Fix misplaced static variable decl.

Why this compiled is a mystery. Since empty wasn't captured it should
have raised an unused variable for the outside the lambda declaration
and an undeclared variable for the use inside. Only gcc 7 raised the
first error and nothing noticed the second.
This commit is contained in:
John Ralls 2023-04-02 15:24:56 -07:00
parent 6091982952
commit 30cbf3074e

View File

@ -985,8 +985,8 @@ wrap_unique_ptr(GncOptionDBPtr, GncOptionDB);
const GncOptionMultichoiceValue& option)
{
static const auto uint16_t_max = std::numeric_limits<uint16_t>::max();
static const char* empty{""};
auto scm_to_str = [](auto item)->const char* {
static const char* empty{""};
if (scm_is_integer(item))
item = scm_number_to_string(item, scm_from_uint(10u));
else if (scm_is_symbol(item))