[Lldb-commits] [lldb] r305099 - [VMRange] Use llvm::find_if. Thanks to Zachary for the suggestion.
Davide Italiano via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 9 12:15:00 PDT 2017
Author: davide
Date: Fri Jun 9 14:14:59 2017
New Revision: 305099
URL: http://llvm.org/viewvc/llvm-project?rev=305099&view=rev
Log:
[VMRange] Use llvm::find_if. Thanks to Zachary for the suggestion.
Modified:
lldb/trunk/source/Utility/VMRange.cpp
Modified: lldb/trunk/source/Utility/VMRange.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/VMRange.cpp?rev=305099&r1=305098&r2=305099&view=diff
==============================================================================
--- lldb/trunk/source/Utility/VMRange.cpp (original)
+++ lldb/trunk/source/Utility/VMRange.cpp Fri Jun 9 14:14:59 2017
@@ -25,15 +25,13 @@ using namespace lldb_private;
bool VMRange::ContainsValue(const VMRange::collection &coll,
lldb::addr_t value) {
ValueInRangeUnaryPredicate in_range_predicate(value);
- VMRange::const_iterator end = coll.end();
- return std::find_if(coll.begin(), end, in_range_predicate) != end;
+ return llvm::find_if(coll, in_range_predicate) != coll.end();
}
bool VMRange::ContainsRange(const VMRange::collection &coll,
const VMRange &range) {
RangeInRangeUnaryPredicate in_range_predicate(range);
- VMRange::const_iterator end = coll.end();
- return std::find_if(coll.begin(), end, in_range_predicate) != end;
+ return llvm::find_if(coll, in_range_predicate) != coll.end();
}
size_t VMRange::FindRangeIndexThatContainsValue(const VMRange::collection &coll,
More information about the lldb-commits
mailing list