From 4d99d22e10a3cb2a421da1618c127128816613c9 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 26 Sep 2023 13:36:07 +1000 Subject: std::string -> std::pmr::string in psram --- src/database/include/database.hpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/database/include/database.hpp') diff --git a/src/database/include/database.hpp b/src/database/include/database.hpp index 00704a5f..98540f41 100644 --- a/src/database/include/database.hpp +++ b/src/database/include/database.hpp @@ -22,9 +22,9 @@ #include "leveldb/iterator.h" #include "leveldb/options.h" #include "leveldb/slice.h" +#include "memory_resource.hpp" #include "records.hpp" #include "result.hpp" -#include "shared_string.h" #include "tag_parser.hpp" #include "tasks.hpp" #include "track.hpp" @@ -33,8 +33,8 @@ namespace database { template struct Continuation { - std::string prefix; - std::string start_key; + std::pmr::string prefix; + std::pmr::string start_key; bool forward; bool was_prev_forward; size_t page_size; @@ -70,17 +70,17 @@ class Result { class IndexRecord { public: explicit IndexRecord(const IndexKey&, - std::optional, + std::optional, std::optional); - auto text() const -> std::optional; + auto text() const -> std::optional; auto track() const -> std::optional; auto Expand(std::size_t) const -> std::optional>; private: IndexKey key_; - std::optional override_text_; + std::optional override_text_; std::optional track_; }; @@ -100,7 +100,7 @@ class Database { auto Update() -> std::future; - auto GetTrackPath(TrackId id) -> std::future>; + auto GetTrackPath(TrackId id) -> std::future>; auto GetTrack(TrackId id) -> std::future>; @@ -115,7 +115,7 @@ class Database { auto GetTracksByIndex(const IndexInfo& index, std::size_t page_size) -> std::future*>; auto GetTracks(std::size_t page_size) -> std::future*>; - auto GetDump(std::size_t page_size) -> std::future*>; + auto GetDump(std::size_t page_size) -> std::future*>; template auto GetPage(Continuation* c) -> std::future*>; @@ -167,8 +167,8 @@ auto Database::ParseRecord(const leveldb::Slice& key, const leveldb::Slice& val) -> std::optional; template <> -auto Database::ParseRecord(const leveldb::Slice& key, - const leveldb::Slice& val) - -> std::optional; +auto Database::ParseRecord(const leveldb::Slice& key, + const leveldb::Slice& val) + -> std::optional; } // namespace database -- cgit v1.2.3