From 64ebfde8bcd6408e3b6925624e8680c314db6efc Mon Sep 17 00:00:00 2001 From: Hannes Schulze Date: Thu, 6 Feb 2025 19:54:38 +0100 Subject: get rid of nasty stdlib --- lib/nes/common/containers/path-view.hh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/nes/common/containers/path-view.hh') diff --git a/lib/nes/common/containers/path-view.hh b/lib/nes/common/containers/path-view.hh index 7741060..1c25d26 100644 --- a/lib/nes/common/containers/path-view.hh +++ b/lib/nes/common/containers/path-view.hh @@ -1,14 +1,14 @@ #pragma once +#include "nes/common/containers/string-view.hh" #include "nes/common/types.hh" -#include namespace nes { /// Non-owning copy of a path, useful for iterating over its components. class path_view { - std::string_view path_; + string_view path_; public: /// An iterator for the path components. @@ -24,7 +24,7 @@ namespace nes auto operator==(iterator const& other) -> bool { return current_ == other.current_; } auto operator!=(iterator const& other) -> bool { return current_ != other.current_; } - auto operator*() const -> std::string_view; + auto operator*() const -> string_view; auto operator++() -> iterator&; auto operator++(int) -> iterator; @@ -38,12 +38,12 @@ namespace nes }; explicit path_view() = default; - explicit path_view(std::string_view const path) + explicit path_view(string_view const path) : path_{ path } { } - auto get_path() const -> std::string_view { return path_; } + auto get_path() const -> string_view { return path_; } auto begin() const -> iterator; auto end() const -> iterator; -- cgit v1.3.1