Skip to content

Commit

Permalink
Update to build with numworks/epsilon@9a1ecec
Browse files Browse the repository at this point in the history
Fixes #1.
  • Loading branch information
boricj committed Sep 27, 2018
1 parent 88c3ad1 commit 5874687
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
snapshots += Tictactoe::App::Snapshot
snapshot_headers += apps/tic_tac_toe/app.h
apps += Tictactoe::App
app_headers += apps/tic_tac_toe/app.h

app_objs += $(addprefix apps/tic_tac_toe/,\
app.o\
Expand Down
11 changes: 6 additions & 5 deletions menu_controller.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "menu_controller.h"
#include "../i18n.h"
#include "../shared/poincare_helpers.h"
#include <assert.h>

using namespace Poincare;
Expand Down Expand Up @@ -107,19 +108,19 @@ void MenuController::willDisplayCellForIndex(HighlightCell * cell, int index) {
switch (index)
{
case 1:
Integer(m_board->width()).writeTextInBuffer(buffer, 3);
Integer(m_board->width()).serialize(buffer, 3);
((MessageTableCellWithEditableText*)myCell)->setAccessoryText(buffer);
break;
case 2:
Integer(m_board->height()).writeTextInBuffer(buffer, 3);
Integer(m_board->height()).serialize(buffer, 3);
((MessageTableCellWithEditableText*)myCell)->setAccessoryText(buffer);
break;
case 3:
Integer(m_board->winCondition()).writeTextInBuffer(buffer, 3);
Integer(m_board->winCondition()).serialize(buffer, 3);
((MessageTableCellWithEditableText*)myCell)->setAccessoryText(buffer);
break;
case 4:
Integer(m_boardController.iaLevel()).writeTextInBuffer(buffer, 3);
Integer(m_boardController.iaLevel()).serialize(buffer, 3);
((MessageTableCellWithEditableText*)myCell)->setAccessoryText(buffer);
break;
}
Expand All @@ -131,7 +132,7 @@ bool MenuController::textFieldShouldFinishEditing(TextField * textField, Ion::Ev

bool MenuController::textFieldDidFinishEditing(TextField * textField, const char * text, Ion::Events::Event event) {
Context * globalContext = textFieldDelegateApp()->localContext();
float floatBody = Expression::approximateToScalar<float>(text, *globalContext);
float floatBody = Shared::PoincareHelpers::ApproximateToScalar<float>(text, *globalContext);
if (std::isnan(floatBody) || std::isinf(floatBody)) {
floatBody = 3;
}
Expand Down

0 comments on commit 5874687

Please sign in to comment.