Codechange: use std::string for FiosIsRoot
This commit is contained in:
@@ -36,9 +36,9 @@
|
||||
# include <i86.h>
|
||||
#endif
|
||||
|
||||
bool FiosIsRoot(const char *file)
|
||||
bool FiosIsRoot(const std::string &file)
|
||||
{
|
||||
return file[3] == '\0';
|
||||
return file.size() == 3; // C:\...
|
||||
}
|
||||
|
||||
void FiosGetDrives(FileList &file_list)
|
||||
|
@@ -57,9 +57,9 @@
|
||||
|
||||
#include "../../safeguards.h"
|
||||
|
||||
bool FiosIsRoot(const char *path)
|
||||
bool FiosIsRoot(const std::string &path)
|
||||
{
|
||||
return path[1] == '\0';
|
||||
return path == PATHSEP;
|
||||
}
|
||||
|
||||
void FiosGetDrives(FileList &file_list)
|
||||
|
@@ -168,9 +168,9 @@ int closedir(DIR *d)
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool FiosIsRoot(const char *file)
|
||||
bool FiosIsRoot(const std::string &file)
|
||||
{
|
||||
return file[3] == '\0'; // C:\...
|
||||
return file.size() == 3; // C:\...
|
||||
}
|
||||
|
||||
void FiosGetDrives(FileList &file_list)
|
||||
|
Reference in New Issue
Block a user