Use std::min and std::max

This commit is contained in:
Romain Goyet
2020-04-12 15:43:39 -04:00
committed by Ecco
parent 77ee5126e1
commit 950862f8d0
79 changed files with 297 additions and 406 deletions

View File

@@ -4,11 +4,10 @@
#include "../constant.h"
#include <escher/metric.h>
#include <assert.h>
#include <algorithm>
using namespace Poincare;
static inline int minInt(int x, int y) { return x < y ? x : y; }
namespace Shared {
StoreController::ContentView::ContentView(DoublePairStore * store, Responder * parentResponder, TableViewDataSource * dataSource, SelectableTableViewDataSource * selectionDataSource, InputEventHandlerDelegate * inputEventHandlerDelegate, TextFieldDelegate * textFieldDelegate) :
@@ -245,7 +244,7 @@ bool StoreController::privateFillColumnWithFormula(Expression formula, Expressio
if (numberOfValuesToCompute == -1) {
numberOfValuesToCompute = m_store->numberOfPairsOfSeries(series);
} else {
numberOfValuesToCompute = minInt(numberOfValuesToCompute, m_store->numberOfPairsOfSeries(series));
numberOfValuesToCompute = std::min(numberOfValuesToCompute, m_store->numberOfPairsOfSeries(series));
}
index++;
}