diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-03-22 17:02:40 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-03-22 18:03:14 +0000 |
| commit | d92816a5f55cea9b67b7aab306eb1109af6dcbbe (patch) | |
| tree | 62e0ce096ad713cac22a70f26a401dc5dc9b2808 /src/ingestor.cpp | |
| parent | 05c47ab65e73b16887b7c7a1eb31acf6d364ef41 (diff) | |
| download | webstat-d92816a5f55cea9b67b7aab306eb1109af6dcbbe.tar.bz2 webstat-d92816a5f55cea9b67b7aab306eb1109af6dcbbe.tar.xz webstat-d92816a5f55cea9b67b7aab306eb1109af6dcbbe.zip | |
Add missing -Wshadow
Diffstat (limited to 'src/ingestor.cpp')
| -rw-r--r-- | src/ingestor.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/ingestor.cpp b/src/ingestor.cpp index fb592d7..eb3be09 100644 --- a/src/ingestor.cpp +++ b/src/ingestor.cpp @@ -43,8 +43,8 @@ namespace WebStat { std::optional<Entity> operator()(const std::optional<T> & value) const { - return value.transform([this](auto && value) { - return (*this)(value); + return value.transform([this](auto && contained) { + return (*this)(contained); }); } }; @@ -69,18 +69,18 @@ namespace WebStat { Ingestor * Ingestor::currentIngestor = nullptr; - Ingestor::Ingestor(const utsname & host, IngestorSettings settings) : + Ingestor::Ingestor(const utsname & host, IngestorSettings givenSettings) : Ingestor {host, std::make_shared<DB::ConnectionPool>( - settings.dbMax, settings.dbKeep, settings.dbType, settings.dbConnStr), - std::move(settings)} + givenSettings.dbMax, givenSettings.dbKeep, givenSettings.dbType, givenSettings.dbConnStr), + std::move(givenSettings)} { } - Ingestor::Ingestor(const utsname & host, DB::ConnectionPoolPtr dbpl, IngestorSettings settings) : - settings {std::move(settings)}, dbpool {std::move(dbpl)}, ingestParkedLines {&Ingestor::jobIngestParkedLines}, - purgeOldLogs {&Ingestor::jobPurgeOldLogs}, hostnameId {crc32(host.nodename)}, curl {curl_multi_init()}, - mainThread {std::this_thread::get_id()} + Ingestor::Ingestor(const utsname & host, DB::ConnectionPoolPtr dbpl, IngestorSettings givenSettings) : + settings {std::move(givenSettings)}, dbpool {std::move(dbpl)}, + ingestParkedLines {&Ingestor::jobIngestParkedLines}, purgeOldLogs {&Ingestor::jobPurgeOldLogs}, + hostnameId {crc32(host.nodename)}, curl {curl_multi_init()}, mainThread {std::this_thread::get_id()} { auto dbconn = dbpool->get(); auto ins = dbconn->modify(SQL::HOST_UPSERT, SQL::HOST_UPSERT_OPTS); @@ -337,7 +337,7 @@ namespace WebStat { void Ingestor::jobIngestParkedLines(FILE * lines, size_t count) { - for (size_t line = 0; line < count; ++line) { + for (size_t lineNo = 0; lineNo < count; ++lineNo) { if (auto line = scn::scan<std::string>(lines, "{:[^\n]}\n")) { linesRead++; queuedLines.emplace_back(std::move(line->value())); @@ -376,9 +376,9 @@ namespace WebStat { auto next = rtn.begin(); visit( [this, &next]<typename X>(const X & entity) { - auto addNewIfReqd = [&next, this](auto && entity) mutable { - if (!existingEntities.contains(std::get<0>(entity))) { - *next++ = entity; + auto addNewIfReqd = [&next, this](auto && entityToAdd) mutable { + if (!existingEntities.contains(std::get<0>(entityToAdd))) { + *next++ = entityToAdd; } return 0; }; |
