archive/Lookup: use PathTraitsFS::pointer_type

This commit is contained in:
Max Kellermann 2019-06-11 18:34:28 +02:00
parent 7de6e4dbac
commit 9f246fc0dc
2 changed files with 5 additions and 5 deletions

View File

@ -24,8 +24,8 @@
#include <string.h>
gcc_pure
static char *
FindSlash(char *p, size_t i) noexcept
static PathTraitsFS::pointer_type
FindSlash(PathTraitsFS::pointer_type p, size_t i) noexcept
{
for (; i > 0; --i)
if (p[i] == '/')
@ -35,11 +35,11 @@ FindSlash(char *p, size_t i) noexcept
}
ArchiveLookupResult
archive_lookup(char *pathname)
archive_lookup(PathTraitsFS::pointer_type pathname)
{
size_t idx = strlen(pathname);
char *slash = nullptr;
PathTraitsFS::pointer_type slash = nullptr;
while (true) {
try {

View File

@ -50,7 +50,7 @@ struct ArchiveLookupResult {
* Throws on error.
*/
ArchiveLookupResult
archive_lookup(char *pathname);
archive_lookup(PathTraitsFS::pointer_type pathname);
#endif