Update word_count.cpp

This commit is contained in:
Kae 2024-03-16 11:07:41 +11:00
parent 78a68b6a20
commit a63707cc59

View File

@ -22,7 +22,7 @@ int main(int argc, char** argv) {
auto assets = Root::singleton().assets();
auto countWordsInType = [&](String const& type, function<int(Json const&)> countFunction, Maybe<function<bool(String const&)>> filterFunction = {}, Maybe<String> wordCountKey = {}) {
auto& files = assets->scanExtension(type).values();
auto files = assets->scanExtension(type).values();
if (filterFunction)
files.filter(*filterFunction);
assets->queueJsons(files);