From 93b8a62d28f9427f0979d62b71f12fb2858064ee Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 11 Sep 2020 11:17:56 +0800 Subject: ... --- include/cru/platform/GraphBase.hpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/cru/platform/GraphBase.hpp') 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) { -- cgit v1.2.3