mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Replace all use of POSIX unlink
Use `<filesystem>` instead of `unlink` and remove `unlink` portability wrapper. Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
@@ -67,8 +67,6 @@ extern int wclose(int fd);
|
||||
// this function called.
|
||||
int wtruncate(const OsPath& pathname, off_t length);
|
||||
|
||||
int wunlink(const OsPath& pathname);
|
||||
|
||||
int wrmdir(const OsPath& path);
|
||||
|
||||
|
||||
|
||||
@@ -93,17 +93,11 @@ int wclose(int fd)
|
||||
return close(fd);
|
||||
}
|
||||
|
||||
|
||||
int wtruncate(const OsPath& pathname, off_t length)
|
||||
{
|
||||
return truncate(OsString(pathname).c_str(), length);
|
||||
}
|
||||
|
||||
int wunlink(const OsPath& pathname)
|
||||
{
|
||||
return unlink(OsString(pathname).c_str());
|
||||
}
|
||||
|
||||
int wrmdir(const OsPath& path)
|
||||
{
|
||||
return rmdir(OsString(path).c_str());
|
||||
|
||||
@@ -146,12 +146,6 @@ int wtruncate(const OsPath& pathname, off_t length)
|
||||
}
|
||||
|
||||
|
||||
int wunlink(const OsPath& pathname)
|
||||
{
|
||||
return _wunlink(OsString(pathname).c_str());
|
||||
}
|
||||
|
||||
|
||||
int wrmdir(const OsPath& path)
|
||||
{
|
||||
return _wrmdir(OsString(path).c_str());
|
||||
|
||||
Reference in New Issue
Block a user