mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-16 01:12:15 +03:00
phase 1 of addressing cppcheck useStlAlgorithm warnings,
this set only includes fill and copy operations.
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <numeric>
|
||||
|
||||
|
||||
#include "tamaramacompile.h"
|
||||
|
||||
@@ -127,9 +129,10 @@ buildTamarama(const TamaInfo &tamaInfo, const u32 queue,
|
||||
sizeof(u32) * subSize + 64; // offsets to subengines in bytecode and
|
||||
// padding for subengines
|
||||
|
||||
for (const auto &sub : tamaInfo.subengines) {
|
||||
total_size += ROUNDUP_CL(sub->length);
|
||||
}
|
||||
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);
|
||||
|
||||
// use subSize as a sentinel value for no active subengines,
|
||||
// so add one to subSize here
|
||||
|
||||
Reference in New Issue
Block a user