Flutter Engine
The Flutter Engine
range.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_IMPELLER_CORE_RANGE_H_
6#define FLUTTER_IMPELLER_CORE_RANGE_H_
7
8#include <cstddef>
9
10namespace impeller {
11
12struct Range {
13 size_t offset = 0;
14 size_t length = 0;
15
16 constexpr Range() {}
17
18 constexpr Range(size_t p_offset, size_t p_length)
19 : offset(p_offset), length(p_length) {}
20
21 constexpr bool operator==(const Range& o) const {
22 return offset == o.offset && length == o.length;
23 }
24};
25
26} // namespace impeller
27
28#endif // FLUTTER_IMPELLER_CORE_RANGE_H_
constexpr Range()
Definition: range.h:16
size_t length
Definition: range.h:14
constexpr Range(size_t p_offset, size_t p_length)
Definition: range.h:18
size_t offset
Definition: range.h:13
constexpr bool operator==(const Range &o) const
Definition: range.h:21