| Flutter Impeller |

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
12 namespace impeller {
13
14 struct 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_
impeller::Range::operator==
constexpr bool operator==(const Range &o) const
Definition: range.h:23
impeller::Range::Range
constexpr Range()
Definition: range.h:18
impeller::Range::offset
size_t offset
Definition: range.h:15
impeller::Range::Range
constexpr Range(size_t p_offset, size_t p_length)
Definition: range.h:20
impeller::Range
Definition: range.h:14
impeller::Range::length
size_t length
Definition: range.h:16
impeller
Definition: aiks_context.cc:10