| Index: base/test/trace_event_analyzer.cc
|
| ===================================================================
|
| --- base/test/trace_event_analyzer.cc (revision 258102)
|
| +++ base/test/trace_event_analyzer.cc (working copy)
|
| @@ -281,10 +281,8 @@
|
| return !left().Evaluate(event);
|
| default:
|
| NOTREACHED();
|
| + return false;
|
| }
|
| -
|
| - NOTREACHED();
|
| - return false;
|
| }
|
|
|
| bool Query::CompareAsDouble(const TraceEvent& event, bool* result) const {
|
| @@ -314,7 +312,6 @@
|
| NOTREACHED();
|
| return false;
|
| }
|
| - return true;
|
| }
|
|
|
| bool Query::CompareAsString(const TraceEvent& event, bool* result) const {
|
| @@ -354,7 +351,6 @@
|
| NOTREACHED();
|
| return false;
|
| }
|
| - return true;
|
| }
|
|
|
| bool Query::EvaluateArithmeticOperator(const TraceEvent& event,
|
| @@ -903,17 +899,11 @@
|
| size_t position,
|
| size_t* return_index) {
|
| DCHECK(return_index);
|
| - if (events.empty())
|
| - return false;
|
| - position = (position < events.size()) ? position : events.size() - 1;
|
| - for (;;) {
|
| - if (query.Evaluate(*events[position])) {
|
| - *return_index = position;
|
| + for (size_t i = std::min(position + 1, events.size()); i != 0; --i) {
|
| + if (query.Evaluate(*events[i - 1])) {
|
| + *return_index = i - 1;
|
| return true;
|
| }
|
| - if (position == 0)
|
| - return false;
|
| - --position;
|
| }
|
| return false;
|
| }
|
|
|