From d868d7b0d463ede80b761f87f10d4e25f52989c3 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Sun, 15 Jun 2025 01:02:30 +0800 Subject: Remove some files of OSX. Symbol Point is conflict and needs to be fixed. --- include/cru/base/Range.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/cru/base/Range.h') diff --git a/include/cru/base/Range.h b/include/cru/base/Range.h index edc2ec55..ade1979a 100644 --- a/include/cru/base/Range.h +++ b/include/cru/base/Range.h @@ -1,6 +1,10 @@ #pragma once #include "Base.h" +#ifdef CRU_PLATFORM_OSX +#include +#endif + namespace cru { struct Range final { constexpr static Range FromTwoSides(Index start, Index end) { @@ -36,6 +40,14 @@ struct Range final { return Range::FromTwoSides(coerce(GetStart()), coerce(GetEnd())); } +#ifdef CRU_PLATFORM_OSX + CFRange ToCFRange() const { return CFRangeMake(this->position, this->count); } + + static Range FromCFRange(const CFRange& range) { + return Range(range.location, range.length); + } +#endif + Index position = 0; Index count = 0; }; -- cgit v1.2.3