Refactoring: use C++11 class member variable initialization
This commit is contained in:
parent
ee57c95aa6
commit
2337237d58
94 changed files with 218 additions and 377 deletions
|
@ -117,15 +117,13 @@ bool FillFileInfoWithNode(Archive::FileInfo* info,
|
|||
} // namespace
|
||||
|
||||
Archive::Archive(const base::FilePath& path)
|
||||
: path_(path), file_(base::File::FILE_OK), header_size_(0) {
|
||||
: path_(path), file_(base::File::FILE_OK) {
|
||||
base::ThreadRestrictions::ScopedAllowIO allow_io;
|
||||
file_.Initialize(path_, base::File::FLAG_OPEN | base::File::FLAG_READ);
|
||||
#if defined(OS_WIN)
|
||||
fd_ = _open_osfhandle(reinterpret_cast<intptr_t>(file_.GetPlatformFile()), 0);
|
||||
#elif defined(OS_POSIX)
|
||||
fd_ = file_.GetPlatformFile();
|
||||
#else
|
||||
fd_ = -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue