summaryrefslogtreecommitdiff
path: root/lib/nes/common/containers/path-builder.hh
diff options
context:
space:
mode:
authorHannes Schulze <haschu0103@outlook.de>2025-02-06 19:54:38 +0100
committerHannes Schulze <haschu0103@outlook.de>2025-02-06 19:54:38 +0100
commit64ebfde8bcd6408e3b6925624e8680c314db6efc (patch)
treeb969314f909f7f16ef5acc63f90dca317a40850a /lib/nes/common/containers/path-builder.hh
parentd060e3a50c987d10799ccc739bdbf9d7d7a13c10 (diff)
get rid of nasty stdlib
Diffstat (limited to 'lib/nes/common/containers/path-builder.hh')
-rw-r--r--lib/nes/common/containers/path-builder.hh11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/nes/common/containers/path-builder.hh b/lib/nes/common/containers/path-builder.hh
index 2991a83..3bddb87 100644
--- a/lib/nes/common/containers/path-builder.hh
+++ b/lib/nes/common/containers/path-builder.hh
@@ -1,10 +1,11 @@
#pragma once
#include "nes/common/containers/span.hh"
+#include "nes/common/containers/string-view.hh"
#include "nes/common/containers/path-view.hh"
#include "nes/common/types.hh"
#include "nes/common/status.hh"
-#include <string_view>
+#include "nes/common/utils.hh"
namespace nes
{
@@ -21,9 +22,9 @@ namespace nes
explicit path_builder(span<char>);
auto get_components() const -> path_view { return path_view{ get_path() }; }
- auto get_path() const -> std::string_view { return std::string_view{ buffer_.get_data(), length_ }; }
+ auto get_path() const -> string_view { return string_view{ buffer_.get_data(), length_ }; }
- auto push(std::string_view) -> status;
+ auto push(string_view) -> status;
auto pop() -> status;
};
@@ -42,13 +43,13 @@ namespace nes
path_buffer(path_buffer const& other)
: path_builder{ buffer_ }
{
- std::copy_n(other.buffer_, Capacity, buffer_);
+ copy(other.buffer_, buffer_, Capacity);
length_ = other.length_;
}
auto operator=(path_buffer const& other)
{
- std::copy_n(other.buffer_, Capacity, buffer_);
+ copy(other.buffer_, buffer_, Capacity);
length_ = other.length_;
}
};