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

Side by Side Diff: util/numeric/checked_range.h

Issue 1372183002: win: Add memory map range intersection helper (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: . Created 5 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 | « no previous file | util/win/process_info.h » ('j') | util/win/process_info.h » ('J')
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 bool ContainsRange(const CheckedRange<ValueType, SizeType>& that) const { 100 bool ContainsRange(const CheckedRange<ValueType, SizeType>& that) const {
101 DCHECK(IsValid()); 101 DCHECK(IsValid());
102 DCHECK(that.IsValid()); 102 DCHECK(that.IsValid());
103 103
104 return that.base() >= base() && that.end() <= end(); 104 return that.base() >= base() && that.end() <= end();
105 } 105 }
106 106
107 private: 107 private:
108 ValueType base_; 108 ValueType base_;
109 SizeType size_; 109 SizeType size_;
110
111 DISALLOW_COPY_AND_ASSIGN(CheckedRange);
112 }; 110 };
113 111
114 } // namespace crashpad 112 } // namespace crashpad
115 113
116 #endif // CRASHPAD_UTIL_NUMERIC_CHECKED_RANGE_H_ 114 #endif // CRASHPAD_UTIL_NUMERIC_CHECKED_RANGE_H_
OLDNEW
« no previous file with comments | « no previous file | util/win/process_info.h » ('j') | util/win/process_info.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698