util/StringPointer: rename typedef pointer to pointer_type

This commit is contained in:
Max Kellermann
2016-04-12 22:49:03 +02:00
parent fd5d42836f
commit 9b85446808
17 changed files with 116 additions and 111 deletions

View File

@@ -91,18 +91,21 @@ public:
};
#endif
static inline bool IsValidPathString(PathTraitsFS::const_pointer path)
static inline bool
IsValidPathString(PathTraitsFS::const_pointer_type path)
{
return path != nullptr && *path != '\0';
}
static inline bool IsValidDir(PathTraitsFS::const_pointer dir)
static inline bool
IsValidDir(PathTraitsFS::const_pointer_type dir)
{
return PathTraitsFS::IsAbsolute(dir) &&
DirectoryExists(Path::FromFS(dir));
}
static inline AllocatedPath SafePathFromFS(PathTraitsFS::const_pointer dir)
static inline AllocatedPath
SafePathFromFS(PathTraitsFS::const_pointer_type dir)
{
if (IsValidPathString(dir) && IsValidDir(dir))
return AllocatedPath::FromFS(dir);