summaryrefslogtreecommitdiff
path: root/src/database/include
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-05-02 17:06:25 +1000
committerjacqueline <me@jacqueline.id.au>2024-05-02 17:06:25 +1000
commita231fd1c8afedbeb14b0bc77d76bad61db986059 (patch)
tree5cbb12f502445776072b691bdebcd0ef6ef54d12 /src/database/include
parentf852e447159757a92564327c6b114f929200b3a0 (diff)
downloadtangara-fw-a231fd1c8afedbeb14b0bc77d76bad61db986059.tar.gz
Replace cpp::span shim with std::span
Diffstat (limited to 'src/database/include')
-rw-r--r--src/database/include/records.hpp2
-rw-r--r--src/database/include/track.hpp9
2 files changed, 5 insertions, 6 deletions
diff --git a/src/database/include/records.hpp b/src/database/include/records.hpp
index 87034059..3ca68fea 100644
--- a/src/database/include/records.hpp
+++ b/src/database/include/records.hpp
@@ -80,6 +80,6 @@ auto TrackIdToBytes(TrackId id) -> std::string;
* Converts a track id encoded via TrackIdToBytes back into a TrackId. May
* return nullopt if parsing fails.
*/
-auto BytesToTrackId(cpp::span<const char> bytes) -> std::optional<TrackId>;
+auto BytesToTrackId(std::span<const char> bytes) -> std::optional<TrackId>;
} // namespace database
diff --git a/src/database/include/track.hpp b/src/database/include/track.hpp
index 76b1c56e..b097ab52 100644
--- a/src/database/include/track.hpp
+++ b/src/database/include/track.hpp
@@ -6,12 +6,12 @@
#pragma once
-#include <stdint.h>
-#include <sys/_stdint.h>
+#include <cstdint>
#include <map>
#include <memory>
#include <optional>
+#include <span>
#include <string>
#include <unordered_map>
#include <utility>
@@ -19,7 +19,6 @@
#include "leveldb/db.h"
#include "memory_resource.hpp"
-#include "span.hpp"
namespace database {
@@ -62,7 +61,7 @@ enum class Tag {
using TagValue = std::variant<std::monostate,
std::pmr::string,
uint32_t,
- cpp::span<const std::pmr::string>>;
+ std::span<const std::pmr::string>>;
auto tagName(Tag) -> std::string;
auto tagHash(const TagValue&) -> uint64_t;
@@ -112,7 +111,7 @@ class TrackTags {
auto albumOrder() const -> uint32_t;
- auto genres() const -> cpp::span<const std::pmr::string>;
+ auto genres() const -> std::span<const std::pmr::string>;
auto genres(const std::string_view) -> void;
/*