[poincare] Coding style

Change-Id: Ia3d073038503fde758c5cc67aa485a53aafe5816
This commit is contained in:
Léa Saviot
2018-05-14 14:22:14 +02:00
parent 7d484dbd7f
commit 4c0273fcd2
2 changed files with 12 additions and 12 deletions

View File

@@ -34,21 +34,21 @@ void FractionLayout::collapseSiblingsAndMoveCursor(ExpressionLayoutCursor * curs
}
void FractionLayout::deleteBeforeCursor(ExpressionLayoutCursor * cursor) {
// Case: Left of the denominator.
// Replace the fraction with a horizontal juxtaposition of the numerator and
// the denominator.
/* Case: Left of the denominator.
* Replace the fraction with a horizontal juxtaposition of the numerator and
* the denominator. */
if (cursor->pointedExpressionLayout() == denominatorLayout()) {
assert(cursor->position() == ExpressionLayoutCursor::Position::Left);
if (numeratorLayout()->isEmpty() && denominatorLayout()->isEmpty()) {
// Case: Numerator and denominator are empty.
// Move the cursor then replace the fraction with an empty layout.
/* Case: Numerator and denominator are empty.
* Move the cursor then replace the fraction with an empty layout. */
replaceWithAndMoveCursor(new EmptyLayout(), true, cursor);
return;
}
// Else, replace the fraction with a juxtaposition of the numerator and
// denominator. Place the cursor in the middle of the juxtaposition, which
// is right of the numerator.
/* Else, replace the fraction with a juxtaposition of the numerator and
* denominator. Place the cursor in the middle of the juxtaposition, which
* is right of the numerator. */
// Juxtapose.
ExpressionLayout * numerator = numeratorLayout();
@@ -94,8 +94,8 @@ void FractionLayout::deleteBeforeCursor(ExpressionLayoutCursor * cursor) {
return;
}
// Case: Right.
// Move Right of the denominator.
/* Case: Right.
* Move Right of the denominator. */
if (cursor->pointedExpressionLayout() == this
&& cursor->position() == ExpressionLayoutCursor::Position::Right)
{

View File

@@ -166,9 +166,9 @@ void HorizontalLayout::privateReplaceChild(const ExpressionLayout * oldChild, Ex
void HorizontalLayout::addOrMergeChildAtIndex(ExpressionLayout * eL, int index, bool removeEmptyChildren) {
if (eL->isHorizontal()) {
mergeChildrenAtIndex(static_cast<HorizontalLayout *>(eL), index, removeEmptyChildren);
return;
} else {
addChildAtIndex(eL, index);
}
addChildAtIndex(eL, index);
}
ExpressionLayoutCursor HorizontalLayout::cursorLeftOf(ExpressionLayoutCursor cursor, bool * shouldRecomputeLayout) {