From 6b8798db5d44ef54362139caa081ed345e5d24c7 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 14 Nov 2017 15:25:46 +0100 Subject: Fix most warnings about nested else Fix two headers triggering the gcc warning the most. Change-Id: I5b2483b8daac998e368f7f8a5edc6185d23df350 Reviewed-by: Viktor Engelmann --- chromium/content/common/input/event_with_latency_info.h | 3 ++- chromium/third_party/WebKit/Source/core/dom/CollectionIndexCache.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/chromium/content/common/input/event_with_latency_info.h b/chromium/content/common/input/event_with_latency_info.h index 3ac2bdd3a32..0f6b2293254 100644 --- a/chromium/content/common/input/event_with_latency_info.h +++ b/chromium/content/common/input/event_with_latency_info.h @@ -49,8 +49,9 @@ class EventWithLatencyInfo { void CoalesceWith(const EventWithLatencyInfo& other) { // |other| should be a newer event than |this|. - if (other.latency.trace_id() >= 0 && latency.trace_id() >= 0) + if (other.latency.trace_id() >= 0 && latency.trace_id() >= 0) { DCHECK_GT(other.latency.trace_id(), latency.trace_id()); + } // New events get coalesced into older events, and the newer timestamp // should always be preserved. diff --git a/chromium/third_party/WebKit/Source/core/dom/CollectionIndexCache.h b/chromium/third_party/WebKit/Source/core/dom/CollectionIndexCache.h index c71e657ba53..d395ce2061d 100644 --- a/chromium/third_party/WebKit/Source/core/dom/CollectionIndexCache.h +++ b/chromium/third_party/WebKit/Source/core/dom/CollectionIndexCache.h @@ -217,8 +217,9 @@ CollectionIndexCache::NodeAfterCachedNode( collection.TraverseForwardToOffset(index, *CachedNode(), current_index); if (!current_node) { // Did not find the node. On plus side, we now know the length. - if (IsCachedNodeCountValid()) + if (IsCachedNodeCountValid()) { DCHECK_EQ(current_index + 1, CachedNodeCount()); + } SetCachedNodeCount(current_index + 1); return nullptr; } -- cgit v1.2.1