aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/controls')
-rw-r--r--src/ui/controls/flex_layout.cpp4
-rw-r--r--src/ui/controls/text_control_service.hpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/controls/flex_layout.cpp b/src/ui/controls/flex_layout.cpp
index 1c649e3b..c881b6f1 100644
--- a/src/ui/controls/flex_layout.cpp
+++ b/src/ui/controls/flex_layout.cpp
@@ -29,14 +29,14 @@ int FindPosition(render::RenderObject* parent, render::RenderObject* child) {
} // namespace
FlexChildLayoutData FlexLayout::GetChildLayoutData(Control* control) {
- assert(control);
+ Expects(control);
return *render_object_->GetChildLayoutData(
FindPosition(render_object_.get(), control->GetRenderObject()));
}
void FlexLayout::SetChildLayoutData(Control* control,
const FlexChildLayoutData& data) {
- assert(control);
+ Expects(control);
*render_object_->GetChildLayoutData(
FindPosition(render_object_.get(), control->GetRenderObject())) = data;
}
diff --git a/src/ui/controls/text_control_service.hpp b/src/ui/controls/text_control_service.hpp
index d4f3ecf9..0da8abed 100644
--- a/src/ui/controls/text_control_service.hpp
+++ b/src/ui/controls/text_control_service.hpp
@@ -141,7 +141,7 @@ void TextControlService<TControl>::AbortSelection() {
template <typename TControl>
void TextControlService<TControl>::SetupCaretTimer() {
#ifdef CRU_DEBUG
- assert(!caret_timer_set_);
+ Expects(!caret_timer_set_);
caret_timer_set_ = true;
#endif
caret_timer_tag_ =
@@ -155,7 +155,7 @@ void TextControlService<TControl>::SetupCaretTimer() {
template <typename TControl>
void TextControlService<TControl>::TearDownCaretTimer() {
#ifdef CRU_DEBUG
- assert(!caret_timer_set_);
+ Expects(!caret_timer_set_);
caret_timer_set_ = false;
#endif
platform::native::IUiApplication::GetInstance()->CancelTimer(
@@ -164,7 +164,7 @@ void TextControlService<TControl>::TearDownCaretTimer() {
template <typename TControl>
void TextControlService<TControl>::SetupHandlers() {
- assert(event_revoker_guards_.empty());
+ Expects(event_revoker_guards_.empty());
event_revoker_guards_.push_back(
EventRevokerGuard{control_->MouseMoveEvent()->Direct()->AddHandler(
std::bind(&TextControlService::MouseMoveHandler, this,