[escher/poincare] Coding style

This commit is contained in:
Léa Saviot
2020-05-14 17:16:20 +02:00
committed by Émilie Feral
parent 9d5e58f32b
commit 12a45ef8e6
2 changed files with 11 additions and 3 deletions

View File

@@ -81,8 +81,16 @@ void ScrollView::scrollToContentPoint(KDPoint p, bool allowOverscroll) {
// Handle cases when the size of the view has decreased.
setContentOffset(KDPoint(
std::min(contentOffset().x(), std::max<KDCoordinate>(minimalSizeForOptimalDisplay().width() - bounds().width(), KDCoordinate{0})),
std::min(contentOffset().y(), std::max<KDCoordinate>(minimalSizeForOptimalDisplay().height() - bounds().height(), 0))));
std::min(
contentOffset().x(),
std::max<KDCoordinate>(
minimalSizeForOptimalDisplay().width() - bounds().width(),
KDCoordinate(0))),
std::min(
contentOffset().y(),
std::max<KDCoordinate>(
minimalSizeForOptimalDisplay().height() - bounds().height(),
KDCoordinate(0)))));
}
void ScrollView::scrollToContentRect(KDRect rect, bool allowOverscroll) {

View File

@@ -31,7 +31,7 @@ void TreeNode::rename(uint16_t identifier, bool unregisterPreviousIdentifier) {
TreeNode * TreeNode::parent() const {
assert(m_parentIdentifier != m_identifier);
return TreeHandle::hasNode(m_parentIdentifier) ? TreePool::sharedPool()->node(m_parentIdentifier) : nullptr;
return TreeHandle::hasNode(m_parentIdentifier) ? TreePool::sharedPool()->node(m_parentIdentifier) : nullptr;
}
TreeNode * TreeNode::root() {