Co-authored-by: Remi Gacogne <github@coredump.fr>
if (valuesCount > 0) {
valuesVect.reserve(valuesCount);
for (size_t idx = 0; idx < valuesCount; idx++) {
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
valuesVect.push_back({std::string(values[idx].value, values[idx].size), values[idx].type});
}
}
if (valuesCount > 0) {
valuesVect.reserve(valuesCount);
for (size_t idx = 0; idx < valuesCount; idx++) {
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
valuesVect.push_back({std::string(values[idx].value, values[idx].size), values[idx].type});
}
}
}
return true;
});
+ // NOLINTNEXTLINE(performance-unnecessary-value-param)
luaCtx.writeFunction("incMetric", [](const std::string& name, boost::optional<boost::variant<uint64_t, update_metric_opts_t>> opts) {
auto incOpts = opts.get_value_or(1);
uint64_t step = 1;
}
return std::get<uint64_t>(result);
});
+ // NOLINTNEXTLINE(performance-unnecessary-value-param)
luaCtx.writeFunction("decMetric", [](const std::string& name, boost::optional<boost::variant<uint64_t, update_metric_opts_t>> opts) {
auto decOpts = opts.get_value_or(1);
uint64_t step = 1;