mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 04:09:45 +00:00
Use const ref instead of value for Twine in the disk_space() API
Thanks Rui for noticing! From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265074 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
44f51d9b56
commit
3ddee86990
@ -658,7 +658,7 @@ std::error_code getUniqueID(const Twine Path, UniqueID &Result);
|
||||
/// @returns a space_info structure filled with the capacity, free, and
|
||||
/// available space on the device \a Path is on. A platform specific error_code
|
||||
/// is returned on error.
|
||||
ErrorOr<space_info> disk_space(const Twine Path);
|
||||
ErrorOr<space_info> disk_space(const Twine &Path);
|
||||
|
||||
/// This class represents a memory mapped file. It is based on
|
||||
/// boost::iostreams::mapped_file.
|
||||
|
@ -208,7 +208,7 @@ UniqueID file_status::getUniqueID() const {
|
||||
return UniqueID(fs_st_dev, fs_st_ino);
|
||||
}
|
||||
|
||||
ErrorOr<space_info> disk_space(const Twine Path) {
|
||||
ErrorOr<space_info> disk_space(const Twine &Path) {
|
||||
struct STATVFS Vfs;
|
||||
if (::STATVFS(Path.str().c_str(), &Vfs))
|
||||
return std::error_code(errno, std::generic_category());
|
||||
|
@ -151,7 +151,7 @@ UniqueID file_status::getUniqueID() const {
|
||||
return UniqueID(VolumeSerialNumber, FileID);
|
||||
}
|
||||
|
||||
ErrorOr<space_info> disk_space(const Twine Path) {
|
||||
ErrorOr<space_info> disk_space(const Twine &Path) {
|
||||
PULARGE_INTEGER Avail, Total, Free;
|
||||
if (!::GetDiskFreeSpaceExA(Path.str().c_str(), &Avail, &Total, &Free))
|
||||
return mapWindowsError(::GetLastError());
|
||||
|
Loading…
Reference in New Issue
Block a user