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

Side by Side Diff: maps.cc

Issue 10824229: Add out-of-line copy ctor to Maps::Iterator. (Closed) Base URL: http://seccompsandbox.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « maps.h ('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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "maps.h" 5 #include "maps.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <linux/unistd.h> 9 #include <linux/unistd.h>
10 #include <signal.h> 10 #include <signal.h>
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 Maps::~Maps() { 106 Maps::~Maps() {
107 } 107 }
108 108
109 Maps::Iterator::Iterator(Maps* maps, bool at_beginning, bool at_end) 109 Maps::Iterator::Iterator(Maps* maps, bool at_beginning, bool at_end)
110 : maps_(maps), 110 : maps_(maps),
111 at_beginning_(at_beginning), 111 at_beginning_(at_beginning),
112 at_end_(at_end) { 112 at_end_(at_end) {
113 } 113 }
114 114
115 Maps::Iterator::Iterator(const Iterator& other)
116 : iter_(other.iter_),
117 maps_(other.maps_),
118 at_beginning_(other.at_beginning_),
119 at_end_(other.at_end_) {
120 }
121
115 Maps::LibraryMap::iterator& Maps::Iterator::getIterator() const { 122 Maps::LibraryMap::iterator& Maps::Iterator::getIterator() const {
116 if (at_beginning_) { 123 if (at_beginning_) {
117 iter_ = maps_->libs_.begin(); 124 iter_ = maps_->libs_.begin();
118 } else if (at_end_) { 125 } else if (at_end_) {
119 iter_ = maps_->libs_.end(); 126 iter_ = maps_->libs_.end();
120 } 127 }
121 return iter_; 128 return iter_;
122 } 129 }
123 130
124 Maps::Iterator Maps::Iterator::begin() { 131 Maps::Iterator Maps::Iterator::begin() {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 break; 269 break;
263 } 270 }
264 } 271 }
265 } while (len || long_line); 272 } while (len || long_line);
266 new_addr = NULL; 273 new_addr = NULL;
267 done: 274 done:
268 return reinterpret_cast<char*>(new_addr); 275 return reinterpret_cast<char*>(new_addr);
269 } 276 }
270 277
271 } // namespace 278 } // namespace
OLDNEW
« no previous file with comments | « maps.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698