aboutsummaryrefslogtreecommitdiff
path: root/src/ui/render/RenderObject.cpp
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-09-07 11:46:11 +0800
committerYuqian Yang <crupest@crupest.life>2025-09-07 11:46:11 +0800
commita0403d95bea3e3a3eaedf71a0d9c6d4e1316bd8c (patch)
treeb97687f99055b04775b63b7bafd2c909a7074cdb /src/ui/render/RenderObject.cpp
parent20123151d12a0b01453ab6a36c84e4d3e5ea9504 (diff)
downloadcru-a0403d95bea3e3a3eaedf71a0d9c6d4e1316bd8c.tar.gz
cru-a0403d95bea3e3a3eaedf71a0d9c6d4e1316bd8c.tar.bz2
cru-a0403d95bea3e3a3eaedf71a0d9c6d4e1316bd8c.zip
Use std::string in logger.
Diffstat (limited to 'src/ui/render/RenderObject.cpp')
-rw-r--r--src/ui/render/RenderObject.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ui/render/RenderObject.cpp b/src/ui/render/RenderObject.cpp
index b3a28d6d..1803a131 100644
--- a/src/ui/render/RenderObject.cpp
+++ b/src/ui/render/RenderObject.cpp
@@ -119,16 +119,16 @@ void RenderObject::Measure(const MeasureRequirement& requirement,
preferred_size.OverrideBy(preferred_size_);
if constexpr (cru::ui::debug_flags::layout) {
- CRU_LOG_TAG_DEBUG(u"{} Measure begins :\nrequirement: {}\npreferred size: {}",
- this->GetDebugPathInTree(), requirement.ToDebugString(),
- preferred_size.ToDebugString());
+ CRU_LOG_TAG_DEBUG("{} Measure begins :\nrequirement: {}\npreferred size: {}",
+ this->GetDebugPathInTree().ToUtf8(), requirement.ToDebugString().ToUtf8(),
+ preferred_size.ToDebugString().ToUtf8());
}
desired_size_ = OnMeasureCore(merged_requirement, merged_preferred_size);
if constexpr (cru::ui::debug_flags::layout) {
- CRU_LOG_TAG_DEBUG(u"{} Measure ends :\nresult size: {}",
- this->GetDebugPathInTree(), desired_size_);
+ CRU_LOG_TAG_DEBUG("{} Measure ends :\nresult size: {}",
+ this->GetDebugPathInTree().ToUtf8(), desired_size_);
}
Ensures(desired_size_.width >= 0);
@@ -144,8 +144,8 @@ Size RenderObject::Measure1(const BoxConstraint& constraint) {
void RenderObject::Layout(const Point& offset) {
if constexpr (cru::ui::debug_flags::layout) {
- CRU_LOG_TAG_DEBUG(u"{} Layout :\noffset: {} size: {}",
- this->GetDebugPathInTree(), offset, desired_size_);
+ CRU_LOG_TAG_DEBUG("{} Layout :\noffset: {} size: {}",
+ this->GetDebugPathInTree().ToUtf8(), offset, desired_size_);
}
offset_ = offset;
size_ = desired_size_;
@@ -192,14 +192,14 @@ Size RenderObject::OnMeasureCore1(const BoxConstraint& constraint) {
if (space_size.width > merged_constraint.max.width) {
space_size.width = merged_constraint.max.width;
- CRU_LOG_TAG_WARN(u"{} space width is over constraint.max.width",
- this->GetDebugPathInTree());
+ CRU_LOG_TAG_WARN("{} space width is over constraint.max.width",
+ this->GetDebugPathInTree().ToUtf8());
}
if (space_size.height > merged_constraint.max.height) {
space_size.height = merged_constraint.max.height;
- CRU_LOG_TAG_WARN(u"{} space height is over constraint.max.height",
- this->GetDebugPathInTree());
+ CRU_LOG_TAG_WARN("{} space height is over constraint.max.height",
+ this->GetDebugPathInTree().ToUtf8());
}
BoxConstraint content_constraint{merged_constraint.max - space_size,