Reformat the WebRTC code base
Running clang-format with chromium's style guide. The goal is n-fold: * providing consistency and readability (that's what code guidelines are for) * preventing noise with presubmit checks and git cl format * building on the previous point: making it easier to automatically fix format issues * you name it Please consider using git-hyper-blame to ignore this commit. Bug: webrtc:9340 Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87 Reviewed-on: https://webrtc-review.googlesource.com/81185 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23660}
This commit is contained in:
@ -33,7 +33,7 @@
|
||||
|
||||
namespace rtc {
|
||||
|
||||
bool Win32Filesystem::DeleteFile(const Pathname &filename) {
|
||||
bool Win32Filesystem::DeleteFile(const Pathname& filename) {
|
||||
RTC_LOG(LS_INFO) << "Deleting file " << filename.pathname();
|
||||
if (!IsFile(filename)) {
|
||||
RTC_DCHECK(IsFile(filename));
|
||||
@ -42,8 +42,8 @@ bool Win32Filesystem::DeleteFile(const Pathname &filename) {
|
||||
return ::DeleteFile(ToUtf16(filename.pathname()).c_str()) != 0;
|
||||
}
|
||||
|
||||
bool Win32Filesystem::MoveFile(const Pathname &old_path,
|
||||
const Pathname &new_path) {
|
||||
bool Win32Filesystem::MoveFile(const Pathname& old_path,
|
||||
const Pathname& new_path) {
|
||||
if (!IsFile(old_path)) {
|
||||
RTC_DCHECK(IsFile(old_path));
|
||||
return false;
|
||||
@ -54,16 +54,16 @@ bool Win32Filesystem::MoveFile(const Pathname &old_path,
|
||||
ToUtf16(new_path.pathname()).c_str()) != 0;
|
||||
}
|
||||
|
||||
bool Win32Filesystem::IsFolder(const Pathname &path) {
|
||||
bool Win32Filesystem::IsFolder(const Pathname& path) {
|
||||
WIN32_FILE_ATTRIBUTE_DATA data = {0};
|
||||
if (0 == ::GetFileAttributesEx(ToUtf16(path.pathname()).c_str(),
|
||||
GetFileExInfoStandard, &data))
|
||||
return false;
|
||||
return (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ==
|
||||
FILE_ATTRIBUTE_DIRECTORY;
|
||||
FILE_ATTRIBUTE_DIRECTORY;
|
||||
}
|
||||
|
||||
bool Win32Filesystem::IsFile(const Pathname &path) {
|
||||
bool Win32Filesystem::IsFile(const Pathname& path) {
|
||||
WIN32_FILE_ATTRIBUTE_DATA data = {0};
|
||||
if (0 == ::GetFileAttributesEx(ToUtf16(path.pathname()).c_str(),
|
||||
GetFileExInfoStandard, &data))
|
||||
@ -71,11 +71,11 @@ bool Win32Filesystem::IsFile(const Pathname &path) {
|
||||
return (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0;
|
||||
}
|
||||
|
||||
bool Win32Filesystem::GetFileSize(const Pathname &pathname, size_t *size) {
|
||||
bool Win32Filesystem::GetFileSize(const Pathname& pathname, size_t* size) {
|
||||
WIN32_FILE_ATTRIBUTE_DATA data = {0};
|
||||
if (::GetFileAttributesEx(ToUtf16(pathname.pathname()).c_str(),
|
||||
GetFileExInfoStandard, &data) == 0)
|
||||
return false;
|
||||
return false;
|
||||
*size = data.nFileSizeLow;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user