mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-24 08:10:50 +01:00
[poincare] Coding style
Change-Id: I0de1e558b3b9483456ccca5b8d42b6d0b9f2e30e
This commit is contained in:
@@ -15,7 +15,8 @@ extern "C" {
|
||||
namespace Poincare {
|
||||
|
||||
ExpressionLayout * BinomialCoefficientLayout::clone() const {
|
||||
return new BinomialCoefficientLayout(const_cast<BinomialCoefficientLayout *>(this)->nLayout(), const_cast<BinomialCoefficientLayout *>(this)->kLayout(), true);
|
||||
BinomialCoefficientLayout * layout = new BinomialCoefficientLayout(const_cast<BinomialCoefficientLayout *>(this)->nLayout(), const_cast<BinomialCoefficientLayout *>(this)->kLayout(), true);
|
||||
return layout;
|
||||
}
|
||||
|
||||
ExpressionLayoutCursor BinomialCoefficientLayout::cursorLeftOf(ExpressionLayoutCursor cursor, bool * shouldRecomputeLayout) {
|
||||
|
||||
@@ -21,7 +21,7 @@ DynamicLayoutHierarchy::DynamicLayoutHierarchy(const ExpressionLayout * const *
|
||||
{
|
||||
assert(children != nullptr);
|
||||
m_children = new const ExpressionLayout * [numberOfChildren];
|
||||
for (int i=0; i<numberOfChildren; i++) {
|
||||
for (int i = 0; i < numberOfChildren; i++) {
|
||||
assert(children[i] != nullptr);
|
||||
if (cloneChildren) {
|
||||
m_children[i] = children[i]->clone();
|
||||
@@ -55,10 +55,10 @@ void DynamicLayoutHierarchy::addChildrenAtIndex(const ExpressionLayout * const *
|
||||
const ExpressionLayout ** newOperands = new const ExpressionLayout * [m_numberOfChildren+numberOfOperands];
|
||||
int currentIndex = 0;
|
||||
assert(indexForInsertion <= m_numberOfChildren);
|
||||
for (int i=0; i<indexForInsertion; i++) {
|
||||
for (int i = 0; i < indexForInsertion; i++) {
|
||||
newOperands[currentIndex++] = m_children[i];
|
||||
}
|
||||
for (int i=0; i<numberOfOperands; i++) {
|
||||
for (int i = 0; i < numberOfOperands; i++) {
|
||||
if (!removeEmptyChildren
|
||||
|| !operands[i]->isEmpty()
|
||||
|| (i < numberOfOperands-1 && operands[i+1]->mustHaveLeftSibling()))
|
||||
@@ -67,7 +67,7 @@ void DynamicLayoutHierarchy::addChildrenAtIndex(const ExpressionLayout * const *
|
||||
newOperands[currentIndex++] = operands[i];
|
||||
}
|
||||
}
|
||||
for (int i=indexForInsertion; i<m_numberOfChildren; i++) {
|
||||
for (int i = indexForInsertion; i < m_numberOfChildren; i++) {
|
||||
newOperands[currentIndex++] = m_children[i];
|
||||
}
|
||||
if (m_children != nullptr) {
|
||||
@@ -81,7 +81,7 @@ bool DynamicLayoutHierarchy::addChildAtIndex(ExpressionLayout * child, int index
|
||||
assert(index >= 0 && index <= m_numberOfChildren);
|
||||
const ExpressionLayout ** newChildren = new const ExpressionLayout * [m_numberOfChildren+1];
|
||||
int j = 0;
|
||||
for (int i=0; i<=m_numberOfChildren; i++) {
|
||||
for (int i = 0; i <= m_numberOfChildren; i++) {
|
||||
if (i == index) {
|
||||
child->setParent(this);
|
||||
newChildren[i] = child;
|
||||
|
||||
@@ -51,7 +51,7 @@ template<int T>
|
||||
void StaticLayoutHierarchy<T>::build(const ExpressionLayout * const * operands, int numberOfOperands, bool cloneOperands) {
|
||||
assert(operands != nullptr);
|
||||
assert(numberOfOperands <= T);
|
||||
for (int i=0; i < numberOfOperands; i++) {
|
||||
for (int i = 0; i < numberOfOperands; i++) {
|
||||
if (cloneOperands && operands[i] != nullptr) {
|
||||
m_children[i] = operands[i]->clone();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user