Skip to content

Commit

Permalink
Make clang happy
Browse files Browse the repository at this point in the history
  • Loading branch information
alabuzhev committed Feb 3, 2024
1 parent 18ae412 commit 57d22bf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
13 changes: 10 additions & 3 deletions far/pathmix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ std::pair<string_view, string_view> name_ext(string_view const Path)
}

template<typename char_type>
bool legacy::AddEndSlash(char_type* const Path)
static bool LegacyAddEndSlash(char_type* const Path)
{
if (!Path)
return false;
Expand All @@ -312,9 +312,16 @@ bool legacy::AddEndSlash(char_type* const Path)
return true;
}

template bool legacy::AddEndSlash<wchar_t>(wchar_t* Path);
bool legacy::AddEndSlash(wchar_t* const Path)
{
return LegacyAddEndSlash(Path);
}

#ifndef NO_WRAPPER
template bool legacy::AddEndSlash<char>(char* Path);
bool legacy::AddEndSlash(char* const Path)
{
return LegacyAddEndSlash(Path);
}
#endif

void AddEndSlash(string& Path)
Expand Down
7 changes: 5 additions & 2 deletions far/pathmix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,11 @@ std::pair<string_view, string_view> name_ext(string_view Path);

namespace legacy
{
template<typename char_type>
bool AddEndSlash(char_type* Path);
bool AddEndSlash(wchar_t* Path);

#ifndef NO_WRAPPER
bool AddEndSlash(char* Path);
#endif

void DeleteEndSlash(wchar_t* Path);
}
Expand Down

0 comments on commit 57d22bf

Please sign in to comment.