fs/Traits: use auto

This commit is contained in:
Max Kellermann 2020-03-13 19:40:51 +01:00
parent 58c7ec07a4
commit aa722bd8ac

View File

@ -60,7 +60,7 @@ GetBasePathImpl(typename Traits::const_pointer p) noexcept
assert(p != nullptr); assert(p != nullptr);
#endif #endif
typename Traits::const_pointer sep = Traits::FindLastSeparator(p); auto sep = Traits::FindLastSeparator(p);
return sep != nullptr return sep != nullptr
? sep + 1 ? sep + 1
: p; : p;
@ -75,7 +75,7 @@ GetParentPathImpl(typename Traits::const_pointer p) noexcept
assert(p != nullptr); assert(p != nullptr);
#endif #endif
typename Traits::const_pointer sep = Traits::FindLastSeparator(p); auto sep = Traits::FindLastSeparator(p);
if (sep == nullptr) if (sep == nullptr)
return typename Traits::string(Traits::CURRENT_DIRECTORY); return typename Traits::string(Traits::CURRENT_DIRECTORY);
if (sep == p) if (sep == p)