From 512d026de016f2720060d264adec02e56123851d Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Thu, 24 Oct 2024 09:04:35 -0500 Subject: As always, formatting is a pain. --- source/fud_format.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'source/fud_format.cpp') diff --git a/source/fud_format.cpp b/source/fud_format.cpp index 04e611e..6bd5aae 100644 --- a/source/fud_format.cpp +++ b/source/fud_format.cpp @@ -23,12 +23,9 @@ FudStatus getFormatSign(StringView& formatView, FormatSpec& spec); } // namespace impl -Result FormatSpec::make(StringView formatView, size_t& specLength) +Result FormatSpec::parse(StringView formatView, size_t& specLength) { - static_cast(formatView); - static_cast(specLength); - - if (formatView[0] != FormatSpec::openBracket) { + if (formatView.length() < 2 || formatView[0] != FormatSpec::openBracket) { return FudStatus::ArgumentInvalid; } -- cgit v1.2.3