From 00143afc01dbca797471181105738042e89f15ae Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Sat, 13 Apr 2024 00:04:42 +0200 Subject: Use string view everywhere --- deimos/core/format.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'deimos/core/format.h') diff --git a/deimos/core/format.h b/deimos/core/format.h index be2e4bf..3424dc2 100644 --- a/deimos/core/format.h +++ b/deimos/core/format.h @@ -22,9 +22,7 @@ struct FormatArg { int64_t integer; uint64_t unsigned_integer; - - // @Todo Use string views - Span string; + StringView string; }; explicit FormatArg(std::signed_integral auto value) : @@ -37,15 +35,10 @@ struct FormatArg unsigned_integer{value} {} - explicit FormatArg(Span value) : + explicit FormatArg(StringView value) : type{kString}, string{value} {} - - explicit FormatArg(gsl::czstring value) : - type{kString}, - string{value, (int64_t)__builtin_strlen(value)} - {} }; template -- cgit