diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-06-05 21:40:44 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-05 21:40:44 -0300 |
| commit | 5174fc25698cff33b03b5746bf1742e417988f7d (patch) | |
| tree | 232a3acdd9b458de481dbd5cbde889505168c8e8 /src/InMemoryBackend.cpp | |
| parent | 85ed897de3676af866cc619dc700025820c02201 (diff) | |
| download | RNT-5174fc25698cff33b03b5746bf1742e417988f7d.tar.gz RNT-5174fc25698cff33b03b5746bf1742e417988f7d.zip | |
Project C interface, reroute FOL plan enums & format
Diffstat (limited to 'src/InMemoryBackend.cpp')
| -rw-r--r-- | src/InMemoryBackend.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/InMemoryBackend.cpp b/src/InMemoryBackend.cpp index 4649da0..8aebc65 100644 --- a/src/InMemoryBackend.cpp +++ b/src/InMemoryBackend.cpp @@ -2,19 +2,17 @@ #include <picosha2.h> -namespace nt -{ - std::string InMemoryBackend::Put(std::vector<uint8_t> value) - { +namespace nt { + std::string InMemoryBackend::Put(std::vector<uint8_t> value) { const std::string hash = picosha2::hash256_hex_string(value.begin(), value.end()); kv_.emplace(hash, std::move(value)); return hash; } - std::optional<std::vector<uint8_t>> InMemoryBackend::Get(const std::string& hash) - { + std::optional<std::vector<uint8_t>> InMemoryBackend::Get(const std::string& hash) { auto it = kv_.find(hash); - if (it == kv_.end()) return std::nullopt; + if (it == kv_.end()) + return std::nullopt; return it->second; } -} +} // namespace nt |
