diff options
author | crupest <crupest@outlook.com> | 2020-09-11 11:17:56 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-09-11 11:17:56 +0800 |
commit | 93b8a62d28f9427f0979d62b71f12fb2858064ee (patch) | |
tree | 8f77e88a2a48db2a4e9fe72e5c85088f8d659a7f /include/cru/platform/GraphBase.hpp | |
parent | 65ca046989cd641da65b754bfa1c99f5e54b219a (diff) | |
download | cru-93b8a62d28f9427f0979d62b71f12fb2858064ee.tar.gz cru-93b8a62d28f9427f0979d62b71f12fb2858064ee.tar.bz2 cru-93b8a62d28f9427f0979d62b71f12fb2858064ee.zip |
...
Diffstat (limited to 'include/cru/platform/GraphBase.hpp')
-rw-r--r-- | include/cru/platform/GraphBase.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/cru/platform/GraphBase.hpp b/include/cru/platform/GraphBase.hpp index e476e3cd..9f3f8393 100644 --- a/include/cru/platform/GraphBase.hpp +++ b/include/cru/platform/GraphBase.hpp @@ -258,6 +258,8 @@ struct TextRange final { gsl::index GetStart() const { return position; } gsl::index GetEnd() const { return position + count; } + void SetEnd(gsl::index new_end) { count = new_end - position; } + TextRange Normalize() const { auto result = *this; if (result.count < 0) { |