From 3a183f869f1697cb5337e392cb341a07bd7c6295 Mon Sep 17 00:00:00 2001 From: Denis Krjuchkov Date: Tue, 3 Dec 2013 12:26:05 +0600 Subject: fs/Traits.hxx: add GetLengthFS() There is no GetLengthUTF8() because strlen or std::string::size() could be used instead. --- src/fs/Traits.hxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/fs/Traits.hxx b/src/fs/Traits.hxx index 51941cb70..df412b12b 100644 --- a/src/fs/Traits.hxx +++ b/src/fs/Traits.hxx @@ -29,6 +29,7 @@ #include +#include #include /** @@ -79,6 +80,11 @@ struct PathTraits { return IsSeparatorUTF8(*p); } + gcc_pure + static size_t GetLengthFS(const_pointer p) { + return strlen(p); + } + /** * Determine the "base" file name of the given UTF-8 path. * The return value points inside the given string. -- cgit v1.2.3