internal: added error log when getEdgeDefinedPoint is impossible (#10462)

This commit is contained in:
zacoons 2025-05-19 03:10:06 +10:00 committed by GitHub
parent 705b97c4ac
commit 44cb8f769e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,7 +42,6 @@ Vector2D CDecorationPositioner::getEdgeDefinedPoint(uint32_t edges, PHLWINDOW pW
return wb.pos() + Vector2D{0.0, wb.size().y / 2.0}; return wb.pos() + Vector2D{0.0, wb.size().y / 2.0};
else if (RIGHT) else if (RIGHT)
return wb.pos() + Vector2D{wb.size().x, wb.size().y / 2.0}; return wb.pos() + Vector2D{wb.size().x, wb.size().y / 2.0};
UNREACHABLE();
} else { } else {
if (TOP && LEFT) if (TOP && LEFT)
return wb.pos(); return wb.pos();
@ -52,9 +51,8 @@ Vector2D CDecorationPositioner::getEdgeDefinedPoint(uint32_t edges, PHLWINDOW pW
return wb.pos() + wb.size(); return wb.pos() + wb.size();
if (BOTTOM && LEFT) if (BOTTOM && LEFT)
return wb.pos() + Vector2D{0.0, wb.size().y}; return wb.pos() + Vector2D{0.0, wb.size().y};
UNREACHABLE();
} }
UNREACHABLE(); Debug::log(ERR, "getEdgeDefinedPoint: invalid configuration of edges");
return {}; return {};
} }