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

Side by Side Diff: util/mac/mach_o_image_segment_reader.cc

Issue 656703002: Convert NULL to nullptr (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Fix 80-column violations 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 unified diff | Download patch
« no previous file with comments | « util/mac/mach_o_image_segment_reader.h ('k') | util/mac/mach_o_image_symbol_table_reader.h » ('j') | 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 return vmsize() + (SegmentSlides() ? 0 : slide_); 192 return vmsize() + (SegmentSlides() ? 0 : slide_);
193 } 193 }
194 194
195 const process_types::section* MachOImageSegmentReader::GetSectionByName( 195 const process_types::section* MachOImageSegmentReader::GetSectionByName(
196 const std::string& section_name, 196 const std::string& section_name,
197 mach_vm_address_t* address) const { 197 mach_vm_address_t* address) const {
198 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 198 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
199 199
200 const auto& iterator = section_map_.find(section_name); 200 const auto& iterator = section_map_.find(section_name);
201 if (iterator == section_map_.end()) { 201 if (iterator == section_map_.end()) {
202 return NULL; 202 return nullptr;
203 } 203 }
204 204
205 return GetSectionAtIndex(iterator->second, address); 205 return GetSectionAtIndex(iterator->second, address);
206 } 206 }
207 207
208 const process_types::section* MachOImageSegmentReader::GetSectionAtIndex( 208 const process_types::section* MachOImageSegmentReader::GetSectionAtIndex(
209 size_t index, 209 size_t index,
210 mach_vm_address_t* address) const { 210 mach_vm_address_t* address) const {
211 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 211 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
212 CHECK_LT(index, sections_.size()); 212 CHECK_LT(index, sections_.size());
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 } 266 }
267 267
268 void MachOImageSegmentReader::SetSlide(mach_vm_size_t slide) { 268 void MachOImageSegmentReader::SetSlide(mach_vm_size_t slide) {
269 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 269 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
270 INITIALIZATION_STATE_SET_INITIALIZING(initialized_slide_); 270 INITIALIZATION_STATE_SET_INITIALIZING(initialized_slide_);
271 slide_ = slide; 271 slide_ = slide;
272 INITIALIZATION_STATE_SET_VALID(initialized_slide_); 272 INITIALIZATION_STATE_SET_VALID(initialized_slide_);
273 } 273 }
274 274
275 } // namespace crashpad 275 } // namespace crashpad
OLDNEW
« no previous file with comments | « util/mac/mach_o_image_segment_reader.h ('k') | util/mac/mach_o_image_symbol_table_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698