Merge branch 'develop' into wip-cppcheck271-part2

This commit is contained in:
g. economou
2024-05-17 11:08:09 +03:00
committed by GitHub
211 changed files with 3167 additions and 2125 deletions

View File

@@ -32,6 +32,8 @@
*/
#include "config.h"
#include <numeric>
#include "tamaramacompile.h"
@@ -129,14 +131,10 @@ buildTamarama(const TamaInfo &tamaInfo, const u32 queue,
sizeof(u32) * subSize + 64; // offsets to subengines in bytecode and
// padding for subengines
auto subl = [](size_t z, NFA *sub) {
return z + (size_t)(ROUNDUP_CL(sub->length));
};
total_size += std::accumulate(tamaInfo.subengines.begin(), tamaInfo.subengines.end(), 0, subl);
// for (const auto &sub : tamaInfo.subengines) {
// total_size += ROUNDUP_CL(sub->length);
// }
// use subSize as a sentinel value for no active subengines,
// so add one to subSize here