mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-21 06:40:37 +01:00
Use std::min and std::max
This commit is contained in:
@@ -3,11 +3,10 @@
|
||||
#include "../constant.h"
|
||||
#include <assert.h>
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
|
||||
using namespace Poincare;
|
||||
|
||||
static inline int maxInt(int x, int y) { return x > y ? x : y; }
|
||||
|
||||
namespace Shared {
|
||||
|
||||
EditableCellTableViewController::EditableCellTableViewController(Responder * parentResponder) :
|
||||
@@ -60,7 +59,7 @@ bool EditableCellTableViewController::textFieldDidFinishEditing(TextField * text
|
||||
int EditableCellTableViewController::numberOfRows() const {
|
||||
int numberOfModelElements = 0;
|
||||
for (int i = 0; i < numberOfColumns(); i++) {
|
||||
numberOfModelElements = maxInt(numberOfModelElements, numberOfElementsInColumn(i));
|
||||
numberOfModelElements = std::max(numberOfModelElements, numberOfElementsInColumn(i));
|
||||
}
|
||||
return 1 + numberOfModelElements + (numberOfModelElements < maxNumberOfElements());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user