summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorailurux <ailuruxx@gmail.com>2024-05-10 13:06:20 +1000
committerailurux <ailuruxx@gmail.com>2024-05-10 13:06:20 +1000
commit3f177cdb8880abf199f4445f1398cd69fb813892 (patch)
treee20de4949b1344c826e5af41ab701f3db75b21bc /src/util
parent8019c7691889cde4c3d40bbd78d485a92d713bbf (diff)
parente4ce7c4ac23402e09be8d6a52e0f739c0dff4ff0 (diff)
downloadtangara-fw-3f177cdb8880abf199f4445f1398cd69fb813892.tar.gz
Merge branch 'main' into file-browser
Diffstat (limited to 'src/util')
-rw-r--r--src/util/CMakeLists.txt2
-rw-r--r--src/util/include/debug.hpp5
-rw-r--r--src/util/random.cpp4
3 files changed, 5 insertions, 6 deletions
diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt
index bb4ce320..49554be8 100644
--- a/src/util/CMakeLists.txt
+++ b/src/util/CMakeLists.txt
@@ -2,4 +2,4 @@
#
# SPDX-License-Identifier: GPL-3.0-only
-idf_component_register(SRCS INCLUDE_DIRS "include" REQUIRES "database" "span")
+idf_component_register(SRCS INCLUDE_DIRS "include" REQUIRES "memory")
diff --git a/src/util/include/debug.hpp b/src/util/include/debug.hpp
index 620b0974..27fb2999 100644
--- a/src/util/include/debug.hpp
+++ b/src/util/include/debug.hpp
@@ -8,13 +8,12 @@
#include <iomanip>
#include <ostream>
-
+#include <span>
#include <string>
-#include "span.hpp"
namespace util {
-inline std::string format_hex_string(cpp::span<const std::byte> data) {
+inline std::string format_hex_string(std::span<const std::byte> data) {
std::ostringstream oss;
std::ostringstream ascii_values;
int count = 0;
diff --git a/src/util/random.cpp b/src/util/random.cpp
index ae543765..2b2af9c7 100644
--- a/src/util/random.cpp
+++ b/src/util/random.cpp
@@ -29,8 +29,8 @@ auto Random::Next() -> std::uint64_t {
return komirand(&seed1_, &seed2_);
}
-auto Random::RangeInclusive(std::uint64_t lower, std::uint64_t upper)
- -> std::uint64_t {
+auto Random::RangeInclusive(std::uint64_t lower,
+ std::uint64_t upper) -> std::uint64_t {
return (Next() % (upper - lower + 1)) + lower;
}