Removed some dead code.

Change-Id: I1dec8aa22ee9f429335b3402c900b7bf19356e57
This commit is contained in:
Felix Raimundo
2016-03-18 11:17:04 +01:00
committed by Félix Raimundo
parent 12cf51d04e
commit 4eb2553b35
2 changed files with 0 additions and 53 deletions

View File

@@ -20,48 +20,3 @@ Expression * Expression::parse(char * string) {
Expression::~Expression() {
}
/*
bool Expression::identicalTo(Expression * e) {
// By default, two expression are not identical.
// This should obviously be overriden in subclasses!
return false;
}
void Expression::forEachChild(ExpressionAction action) {
Expression ** childPointer = children();
if (childPointer == NULL) {
return;
}
while(*childPointer != NULL) {
(*childPointer->*action)();
childPointer++;
}
}
void Expression::recursiveLayout() {
forEachChild(&Expression::recursiveLayout);
layout();
}
void Expression::recursiveDraw() {
KDPoint origin = KDGetOrigin();
KDSetOrigin(KDPOINT(origin.x + m_frame.origin.x,
origin.y + m_frame.origin.y));
forEachChild(&Expression::recursiveDraw);
draw();
KDSetOrigin(origin);
}
void Expression::draw() {
// No-op by default
}
void Expression::layout() {
// No-op by default
}
*/

View File

@@ -51,7 +51,6 @@ ExpressionLayout * HorizontalLayout::child(uint16_t index) {
KDPoint HorizontalLayout::positionOfChild(ExpressionLayout * child) {
KDPoint position = (KDPoint){.x = 0, .y = 0};
#if 1
uint16_t index = 0;
for (int i=0;i<3;i++) {
if (m_children[i] == child) {
@@ -64,13 +63,6 @@ KDPoint HorizontalLayout::positionOfChild(ExpressionLayout * child) {
assert(previousChild != nullptr);
position.x = previousChild->origin().x + previousChild->size().width;
}
#else
int i = 0;
while(i<3 && m_children[i] != child) {
position.x += m_children[i]->size().width;
i++;
}
#endif
position.y = (size().height - child->size().height)/2;
return position;
}