summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-11-14 15:25:46 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-12-05 17:04:17 +0100
commit6b8798db5d44ef54362139caa081ed345e5d24c7 (patch)
tree121cdd97c384efb4d3e83f61c5d417027c9716ab
parent447b6c20789ba10bf63f52c7cddb6ccc8851c1e4 (diff)
downloadqtwebengine-chromium-6b8798db5d44ef54362139caa081ed345e5d24c7.tar.gz
Fix most warnings about nested else
Fix two headers triggering the gcc warning the most. Change-Id: I5b2483b8daac998e368f7f8a5edc6185d23df350 Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io>
-rw-r--r--chromium/content/common/input/event_with_latency_info.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/CollectionIndexCache.h3
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<Collection, NodeType>::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;
}