]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Simplify return of empty string_view
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 1 Dec 2019 20:16:44 +0000 (21:16 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 1 Dec 2019 20:16:44 +0000 (21:16 +0100)
src/Util.cpp

index 7b85376848cc2f7d5235dbf6fbc2b0775094fea6..b44c3d18974440aea7da82d36a4b9ed0b5f5077b 100644 (file)
@@ -152,10 +152,10 @@ get_extension(string_view path)
 #endif
   size_t pos = path.find_last_of(stop_at_chars);
   if (pos == string_view::npos || path.at(pos) == '/') {
-    return string_view();
+    return {};
 #ifdef _WIN32
   } else if (path.at(pos) == '\\') {
-    return string_view();
+    return {};
 #endif
   } else {
     return path.substr(pos);