Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(635)

Unified Diff: minidump/minidump_module_writer.cc

Issue 681313005: minidump: Use decltype(object) instead of typeof(object) (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « minidump/minidump_memory_writer.cc ('k') | minidump/minidump_writable.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_module_writer.cc
diff --git a/minidump/minidump_module_writer.cc b/minidump/minidump_module_writer.cc
index 45ca9e4342d8766e036a440b9f18fe7f269a2216..0543e3a68469cdb8d050b59944190b7871441480 100644
--- a/minidump/minidump_module_writer.cc
+++ b/minidump/minidump_module_writer.cc
@@ -47,7 +47,7 @@ MinidumpModuleCodeViewRecordPDBLinkWriter<CodeViewRecordType>::SizeOfObject() {
DCHECK_GE(state(), kStateFrozen);
// NUL-terminate.
- return offsetof(typeof(codeview_record_), pdb_name) +
+ return offsetof(decltype(codeview_record_), pdb_name) +
(pdb_name_.size() + 1) * sizeof(pdb_name_[0]);
}
@@ -58,7 +58,7 @@ bool MinidumpModuleCodeViewRecordPDBLinkWriter<CodeViewRecordType>::WriteObject(
WritableIoVec iov;
iov.iov_base = &codeview_record_;
- iov.iov_len = offsetof(typeof(codeview_record_), pdb_name);
+ iov.iov_len = offsetof(decltype(codeview_record_), pdb_name);
std::vector<WritableIoVec> iovecs(1, iov);
// NUL-terminate.
@@ -131,12 +131,12 @@ bool MinidumpModuleMiscDebugRecordWriter::Freeze() {
// NUL-terminate.
if (!image_debug_misc_.Unicode) {
DCHECK(data_utf16_.empty());
- image_debug_misc_.Length = offsetof(typeof(image_debug_misc_), Data) +
+ image_debug_misc_.Length = offsetof(decltype(image_debug_misc_), Data) +
(data_.size() + 1) * sizeof(data_[0]);
} else {
DCHECK(data_.empty());
image_debug_misc_.Length =
- offsetof(typeof(image_debug_misc_), Data) +
+ offsetof(decltype(image_debug_misc_), Data) +
(data_utf16_.size() + 1) * sizeof(data_utf16_[0]);
}
@@ -153,7 +153,7 @@ bool MinidumpModuleMiscDebugRecordWriter::WriteObject(
FileWriterInterface* file_writer) {
DCHECK_EQ(state(), kStateWritable);
- const size_t base_length = offsetof(typeof(image_debug_misc_), Data);
+ const size_t base_length = offsetof(decltype(image_debug_misc_), Data);
WritableIoVec iov;
iov.iov_base = &image_debug_misc_;
« no previous file with comments | « minidump/minidump_memory_writer.cc ('k') | minidump/minidump_writable.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698