From 807c1dfe8a897f9c61bf3549ff2566917b53023b Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 24 Jun 2024 00:06:25 +0800 Subject: feat: fix linux build, complete PosixSpawnSubProcess. NEED TEST: BufferStream, AutoReadStream, SubProcess. --- include/cru/ui/document/TextDocumentElement.h | 2 +- include/cru/ui/render/MeasureRequirement.h | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'include/cru/ui') diff --git a/include/cru/ui/document/TextDocumentElement.h b/include/cru/ui/document/TextDocumentElement.h index f7205b59..93b4933b 100644 --- a/include/cru/ui/document/TextDocumentElement.h +++ b/include/cru/ui/document/TextDocumentElement.h @@ -13,7 +13,7 @@ struct TextStyleTag {}; using TextStyle = Bitmask; struct TextStyles { - static constexpr TextStyle Normal; + static constexpr TextStyle Normal{0x0}; static constexpr TextStyle Bold{0x1}; static constexpr TextStyle Italic{0x2}; }; diff --git a/include/cru/ui/render/MeasureRequirement.h b/include/cru/ui/render/MeasureRequirement.h index 832b936c..ace52ef6 100644 --- a/include/cru/ui/render/MeasureRequirement.h +++ b/include/cru/ui/render/MeasureRequirement.h @@ -24,14 +24,11 @@ class MeasureLength final { constexpr MeasureLength() : MeasureLength(tag_not_specify) {} constexpr MeasureLength(tag_not_specify_t) : length_(-1) {} - constexpr MeasureLength(float length) : length_(length) { - Expects(length >= 0); - } + constexpr MeasureLength(float length) : length_(length) {} MeasureLength(const MeasureLength& other) = default; constexpr MeasureLength& operator=(const MeasureLength& other) = default; constexpr MeasureLength& operator=(float length) { - Expects(length >= 0); length_ = length; return *this; } -- cgit v1.2.3