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

Side by Side Diff: minidump/minidump_writable.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, 1 month 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 unified diff | Download patch
« no previous file with comments | « minidump/minidump_module_writer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 if (!AssignIfInRange(&local_rva, local_offset)) { 173 if (!AssignIfInRange(&local_rva, local_offset)) {
174 LOG(ERROR) << "offset " << local_offset << " out of range"; 174 LOG(ERROR) << "offset " << local_offset << " out of range";
175 return kInvalidSize; 175 return kInvalidSize;
176 } 176 }
177 177
178 for (RVA* rva : registered_rvas_) { 178 for (RVA* rva : registered_rvas_) {
179 *rva = local_rva; 179 *rva = local_rva;
180 } 180 }
181 181
182 if (!registered_location_descriptors_.empty()) { 182 if (!registered_location_descriptors_.empty()) {
183 typeof(registered_location_descriptors_[0]->DataSize) local_size; 183 decltype(registered_location_descriptors_[0]->DataSize) local_size;
184 if (!AssignIfInRange(&local_size, size)) { 184 if (!AssignIfInRange(&local_size, size)) {
185 LOG(ERROR) << "size " << size << " out of range"; 185 LOG(ERROR) << "size " << size << " out of range";
186 return kInvalidSize; 186 return kInvalidSize;
187 } 187 }
188 188
189 for (MINIDUMP_LOCATION_DESCRIPTOR* location_descriptor : 189 for (MINIDUMP_LOCATION_DESCRIPTOR* location_descriptor :
190 registered_location_descriptors_) { 190 registered_location_descriptors_) {
191 location_descriptor->DataSize = local_size; 191 location_descriptor->DataSize = local_size;
192 location_descriptor->Rva = local_rva; 192 location_descriptor->Rva = local_rva;
193 } 193 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 if (!WriteObject(file_writer)) { 260 if (!WriteObject(file_writer)) {
261 return false; 261 return false;
262 } 262 }
263 263
264 state_ = kStateWritten; 264 state_ = kStateWritten;
265 return true; 265 return true;
266 } 266 }
267 267
268 } // namespace internal 268 } // namespace internal
269 } // namespace crashpad 269 } // namespace crashpad
OLDNEW
« no previous file with comments | « minidump/minidump_module_writer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698