diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-09-26 13:36:07 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-09-26 13:36:07 +1000 |
| commit | 4d99d22e10a3cb2a421da1618c127128816613c9 (patch) | |
| tree | 527490a466348e5cf40cf10a8f3768aa5be4e7c1 /src/database/include/index.hpp | |
| parent | f6d06421090f88094aba76b72b04d614f54efafa (diff) | |
| download | tangara-fw-4d99d22e10a3cb2a421da1618c127128816613c9.tar.gz | |
std::string -> std::pmr::string in psram
Diffstat (limited to 'src/database/include/index.hpp')
| -rw-r--r-- | src/database/include/index.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/database/include/index.hpp b/src/database/include/index.hpp index 17b40f5b..838eff31 100644 --- a/src/database/include/index.hpp +++ b/src/database/include/index.hpp @@ -17,7 +17,7 @@ #include "leveldb/slice.h" #include "leveldb/write_batch.h" -#include "shared_string.h" +#include "memory_resource.hpp" #include "track.hpp" namespace database { @@ -29,7 +29,7 @@ struct IndexInfo { IndexId id; // Localised, user-friendly description of this index. e.g. "Albums by Artist" // or "All Tracks". - std::string name; + std::pmr::string name; // Specifier for how this index breaks down the database. std::vector<Tag> components; }; @@ -51,7 +51,7 @@ struct IndexKey { // The filterable / selectable item that this key represents. "Jacqueline" for // kArtist, "My Cool Album" for kAlbum, etc. - std::optional<std::string> item; + std::optional<std::pmr::string> item; // If this is a leaf component, the track id for this record. // This could reasonably be the value for a record, but we keep it as a part // of the key to help with disambiguation. @@ -59,8 +59,8 @@ struct IndexKey { }; auto Index(const IndexInfo&, const Track&, leveldb::WriteBatch*) -> bool; -auto ExpandHeader(const IndexKey::Header&, const std::optional<std::string>&) - -> IndexKey::Header; +auto ExpandHeader(const IndexKey::Header&, + const std::optional<std::pmr::string>&) -> IndexKey::Header; // Predefined indexes // TODO(jacqueline): Make these defined at runtime! :) |
