aboutsummaryrefslogtreecommitdiff
path: root/testing/range_set.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'testing/range_set.cpp')
-rw-r--r--testing/range_set.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/testing/range_set.cpp b/testing/range_set.cpp
index 2fc540f17..725fd7d96 100644
--- a/testing/range_set.cpp
+++ b/testing/range_set.cpp
@@ -1,4 +1,4 @@
-// Copyright 2017 PDFium Authors. All rights reserved.
+// Copyright 2017 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,9 +7,11 @@
#include <algorithm>
#include "core/fxcrt/fx_system.h"
+#include "third_party/base/check.h"
-RangeSet::RangeSet() {}
-RangeSet::~RangeSet() {}
+RangeSet::RangeSet() = default;
+
+RangeSet::~RangeSet() = default;
bool RangeSet::Contains(const Range& range) const {
if (IsEmptyRange(range))
@@ -51,15 +53,14 @@ void RangeSet::Union(const Range& range) {
--end;
- const int new_start = std::min<size_t>(start->first, fixed_range.first);
- const int new_end = std::max(end->second, fixed_range.second);
-
+ const size_t new_start = std::min(start->first, fixed_range.first);
+ const size_t new_end = std::max(end->second, fixed_range.second);
ranges_.erase(start, ++end);
ranges_.insert(Range(new_start, new_end));
}
void RangeSet::Union(const RangeSet& range_set) {
- ASSERT(&range_set != this);
+ DCHECK(&range_set != this);
for (const auto& it : range_set.ranges())
Union(it);
}