Remove unnecessary scope
This commit is contained in:
parent
104585e772
commit
fb78052b3d
1 changed files with 6 additions and 8 deletions
|
@ -118,18 +118,16 @@ bool FillFileInfoWithNode(Archive::FileInfo* info,
|
||||||
|
|
||||||
Archive::Archive(const base::FilePath& path)
|
Archive::Archive(const base::FilePath& path)
|
||||||
: path_(path), file_(base::File::FILE_OK), header_size_(0) {
|
: path_(path), file_(base::File::FILE_OK), header_size_(0) {
|
||||||
{
|
base::ThreadRestrictions::ScopedAllowIO allow_io;
|
||||||
base::ThreadRestrictions::ScopedAllowIO allow_io;
|
file_.Initialize(path_, base::File::FLAG_OPEN | base::File::FLAG_READ);
|
||||||
file_.Initialize(path_, base::File::FLAG_OPEN | base::File::FLAG_READ);
|
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
fd_ =
|
fd_ =
|
||||||
_open_osfhandle(reinterpret_cast<intptr_t>(file_.GetPlatformFile()), 0);
|
_open_osfhandle(reinterpret_cast<intptr_t>(file_.GetPlatformFile()), 0);
|
||||||
#elif defined(OS_POSIX)
|
#elif defined(OS_POSIX)
|
||||||
fd_ = file_.GetPlatformFile();
|
fd_ = file_.GetPlatformFile();
|
||||||
#else
|
#else
|
||||||
fd_ = -1;
|
fd_ = -1;
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Archive::~Archive() {
|
Archive::~Archive() {
|
||||||
|
|
Loading…
Reference in a new issue