diff --git a/escher/src/scroll_view.cpp b/escher/src/scroll_view.cpp index ec06497d9..ab8f8cabd 100644 --- a/escher/src/scroll_view.cpp +++ b/escher/src/scroll_view.cpp @@ -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(minimalSizeForOptimalDisplay().width() - bounds().width(), KDCoordinate{0})), - std::min(contentOffset().y(), std::max(minimalSizeForOptimalDisplay().height() - bounds().height(), 0)))); + std::min( + contentOffset().x(), + std::max( + minimalSizeForOptimalDisplay().width() - bounds().width(), + KDCoordinate(0))), + std::min( + contentOffset().y(), + std::max( + minimalSizeForOptimalDisplay().height() - bounds().height(), + KDCoordinate(0))))); } void ScrollView::scrollToContentRect(KDRect rect, bool allowOverscroll) { diff --git a/poincare/src/tree_node.cpp b/poincare/src/tree_node.cpp index 3052b4a7e..5076cc277 100644 --- a/poincare/src/tree_node.cpp +++ b/poincare/src/tree_node.cpp @@ -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() {