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}
diff --git a/rtc_base/fileutils.cc b/rtc_base/fileutils.cc
index 40ec86f..0037547 100644
--- a/rtc_base/fileutils.cc
+++ b/rtc_base/fileutils.cc
@@ -35,7 +35,7 @@
// to the first file in the directory, and can be advanecd with Next(). This
// allows you to get information about each file.
- // Constructor
+// Constructor
DirectoryIterator::DirectoryIterator()
#ifdef WEBRTC_WIN
: handle_(INVALID_HANDLE_VALUE) {
@@ -45,7 +45,7 @@
#endif
}
- // Destructor
+// Destructor
DirectoryIterator::~DirectoryIterator() {
#if defined(WEBRTC_WIN)
if (handle_ != INVALID_HANDLE_VALUE)
@@ -56,10 +56,10 @@
#endif
}
- // Starts traversing a directory.
- // dir is the directory to traverse
- // returns true if the directory exists and is valid
-bool DirectoryIterator::Iterate(const Pathname &dir) {
+// Starts traversing a directory.
+// dir is the directory to traverse
+// returns true if the directory exists and is valid
+bool DirectoryIterator::Iterate(const Pathname& dir) {
directory_ = dir.pathname();
#if defined(WEBRTC_WIN)
if (handle_ != INVALID_HANDLE_VALUE)
@@ -84,8 +84,8 @@
return true;
}
- // Advances to the next file
- // returns true if there were more files in the directory.
+// Advances to the next file
+// returns true if there were more files in the directory.
bool DirectoryIterator::Next() {
#if defined(WEBRTC_WIN)
return ::FindNextFile(handle_, &data_) == TRUE;
@@ -98,7 +98,7 @@
#endif
}
- // returns true if the file currently pointed to is a directory
+// returns true if the file currently pointed to is a directory
bool DirectoryIterator::IsDirectory() const {
#if defined(WEBRTC_WIN)
return (data_.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != FALSE;
@@ -107,7 +107,7 @@
#endif
}
- // returns the name of the file currently pointed to
+// returns the name of the file currently pointed to
std::string DirectoryIterator::Name() const {
#if defined(WEBRTC_WIN)
return ToUtf8(data_.cFileName);
@@ -119,7 +119,7 @@
FilesystemInterface* Filesystem::default_filesystem_ = nullptr;
-FilesystemInterface *Filesystem::EnsureDefaultFilesystem() {
+FilesystemInterface* Filesystem::EnsureDefaultFilesystem() {
if (!default_filesystem_) {
#if defined(WEBRTC_WIN)
default_filesystem_ = new Win32Filesystem();