Fixed g++ incompatibility

This commit is contained in:
Leonetienne
2021-06-06 15:20:44 +02:00
parent 6974ae58ee
commit 09a2ce4e74
3 changed files with 219 additions and 146 deletions

View File

@@ -463,6 +463,7 @@ std::string Hazelnupp::GenerateDocumentation() const
<< "==== AVAILABLE PARAMETERS ===="
<< std::endl << std::endl;
std::size_t counter = 0;
for (const auto& it : paramInfos)
{
const ParamDocEntry& pde = it.second;
@@ -490,8 +491,11 @@ std::string Hazelnupp::GenerateDocumentation() const
if (pde.description.length() > 0)
ss << pde.description;
if (&it.second != &(paramInfos.cend().operator--())->second)
// Omit linebreaks when we're on the last element
if (counter < paramInfos.size()-1)
ss << std::endl << std::endl;
counter++;
}
}