Bug 1677000 - Address unpublished clang-tidy lints r=Gijs

There are two new lints introduced since IOUtils was written that we're hitting
now:

* IOUtils::InternalFileInfo's constructor does not initialize `mType`, `mSize`,
  `mLastModified`, and `mPermissions`; and
* We should be using a nested namespace statement.

We haven't hit them since these lines haven't been touched, but I noticed them
on the code review frontend.

Differential Revision: https://phabricator.services.mozilla.com/D99163
This commit is contained in:
Barret Rennie 2020-12-09 04:31:55 +00:00
Родитель 8b5f75f647
Коммит 10834d52a9
2 изменённых файлов: 6 добавлений и 8 удалений

Просмотреть файл

@ -59,8 +59,7 @@
} \
} while (0)
namespace mozilla {
namespace dom {
namespace mozilla::dom {
// static helper functions
@ -1417,8 +1416,7 @@ IOUtils::InternalWriteOpts::FromBinding(const WriteOptions& aOptions) {
return opts;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#undef REJECT_IF_SHUTTING_DOWN
#undef REJECT_IF_INIT_PATH_FAILED

Просмотреть файл

@ -407,11 +407,11 @@ class IOUtils::IOError {
*/
struct IOUtils::InternalFileInfo {
nsString mPath;
FileType mType;
uint64_t mSize;
uint64_t mLastModified;
FileType mType = FileType::Other;
uint64_t mSize = 0;
uint64_t mLastModified = 0;
Maybe<uint64_t> mCreationTime;
uint32_t mPermissions;
uint32_t mPermissions = 0;
};
/**