diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-08-18 23:09:43 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-08-18 23:09:43 +0200 |
commit | be621ff4d3124c54fe86577a672f73522fd3323c (patch) | |
tree | a3bd524db43613518dd7ba840c233b8232a7a680 /memfilepersistence | |
parent | ed2c63f77550376ffcd062b429d0b180adfc8135 (diff) |
Include what you need.
Diffstat (limited to 'memfilepersistence')
5 files changed, 13 insertions, 19 deletions
diff --git a/memfilepersistence/src/vespa/memfilepersistence/device/device.cpp b/memfilepersistence/src/vespa/memfilepersistence/device/device.cpp index 50286b4c033..cd1fcafb52c 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/device/device.cpp +++ b/memfilepersistence/src/vespa/memfilepersistence/device/device.cpp @@ -2,10 +2,9 @@ #include "device.h" #include "ioevent.h" #include <sstream> +#include <algorithm> -namespace storage { - -namespace memfile { +namespace storage::memfile { Device::Device(DeviceManager& manager) : _manager(manager) @@ -54,6 +53,4 @@ Device::clearEvents() _events.clear(); } -} // memfile - -} // storage +} diff --git a/memfilepersistence/src/vespa/memfilepersistence/mapper/locationreadplanner.cpp b/memfilepersistence/src/vespa/memfilepersistence/mapper/locationreadplanner.cpp index 46964d9058d..381e5d17766 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/mapper/locationreadplanner.cpp +++ b/memfilepersistence/src/vespa/memfilepersistence/mapper/locationreadplanner.cpp @@ -2,9 +2,9 @@ #include "locationreadplanner.h" #include <vespa/memfilepersistence/memfile/memfileiointerface.h> +#include <algorithm> -namespace storage { -namespace memfile { +namespace storage::memfile { LocationDiskIoPlanner::LocationDiskIoPlanner( const MemFileIOInterface& io, @@ -97,5 +97,4 @@ LocationDiskIoPlanner::print(std::ostream& out, bool verbose, } } -} // memfile -} // storage +} diff --git a/memfilepersistence/src/vespa/memfilepersistence/mapper/memfile_v1_verifier.cpp b/memfilepersistence/src/vespa/memfilepersistence/mapper/memfile_v1_verifier.cpp index be1793ca355..39eb68315d2 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/mapper/memfile_v1_verifier.cpp +++ b/memfilepersistence/src/vespa/memfilepersistence/mapper/memfile_v1_verifier.cpp @@ -7,6 +7,7 @@ #include <vespa/vespalib/stllike/asciistream.h> #include <vespa/vespalib/stllike/hash_set.hpp> #include <sstream> +#include <algorithm> #include <vespa/log/log.h> LOG_SETUP(".persistence.memfilev1.verifier"); diff --git a/memfilepersistence/src/vespa/memfilepersistence/mapper/memfilemapper.cpp b/memfilepersistence/src/vespa/memfilepersistence/mapper/memfilemapper.cpp index 6bf2821d7a9..71d6a6b6fcf 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/mapper/memfilemapper.cpp +++ b/memfilepersistence/src/vespa/memfilepersistence/mapper/memfilemapper.cpp @@ -1,6 +1,5 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #include "memfilemapper.h" #include "memfile_v1_serializer.h" #include <vespa/memfilepersistence/spi/memfilepersistenceprovidermetrics.h> @@ -8,6 +7,7 @@ #include <vespa/vdslib/distribution/distribution.h> #include <vespa/storageframework/generic/clock/timer.h> #include <sstream> +#include <algorithm> #include <vespa/log/bufferedlogger.h> LOG_SETUP(".persistence.memfile.mapper"); diff --git a/memfilepersistence/src/vespa/memfilepersistence/memfile/memfilecompactor.cpp b/memfilepersistence/src/vespa/memfilepersistence/memfile/memfilecompactor.cpp index 3ee3b5fca09..7d84fd3dde5 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/memfile/memfilecompactor.cpp +++ b/memfilepersistence/src/vespa/memfilepersistence/memfile/memfilecompactor.cpp @@ -3,12 +3,12 @@ #include "memfilecompactor.h" #include "memfile.h" #include <vespa/vespalib/stllike/hash_map.hpp> -#include <vespa/log/log.h> +#include <algorithm> +#include <vespa/log/log.h> LOG_SETUP(".persistence.memfile.compactor"); -namespace storage { -namespace memfile { +namespace storage::memfile { struct DocumentVersionInfo { document::DocumentId _id; @@ -71,8 +71,7 @@ struct CompactSlotInfo : private Types { auto matchesId = [&](const DocumentVersionInfo& doc) { return (id == doc._id); }; - auto existing = std::find_if( - gidDocs.begin(), gidDocs.end(), matchesId); + auto existing = std::find_if(gidDocs.begin(), gidDocs.end(), matchesId); if (existing == gidDocs.end()) { // (Very) common case gidDocs.emplace_back(id, isTombstone(slot)); @@ -202,6 +201,4 @@ MemFileCompactor::alwaysCompact(const MemSlot& slot, slotsToRemove.push_back(&slot); } - -} // memfile -} // storage +} |