Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
10#include "flutter/fml/macros.h"
11
12namespace impeller {
13
14struct Range {
15 size_t offset = 0;
16 size_t length = 0;
17
18 constexpr Range() {}
19
20 constexpr Range(size_t p_offset, size_t p_length)
21 : offset(p_offset), length(p_length) {}
22
23 constexpr bool operator==(const Range& o) const {
24 return offset == o.offset && length == o.length;
25 }
26};
27
28} // namespace impeller
29
30#endif // FLUTTER_IMPELLER_CORE_RANGE_H_
constexpr Range()
Definition range.h:18
size_t length
Definition range.h:16
constexpr Range(size_t p_offset, size_t p_length)
Definition range.h:20
size_t offset
Definition range.h:15
constexpr bool operator==(const Range &o) const
Definition range.h:23