mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
Use std::min and std::max
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "images/focused_calcul4_icon.h"
|
||||
#include <poincare/preferences.h>
|
||||
#include <assert.h>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
using namespace Poincare;
|
||||
@@ -22,8 +23,6 @@ using namespace Shared;
|
||||
|
||||
namespace Probability {
|
||||
|
||||
static inline int minInt(int x, int y) { return x < y ? x : y; }
|
||||
|
||||
CalculationController::ContentView::ContentView(SelectableTableView * selectableTableView, Distribution * distribution, Calculation * calculation) :
|
||||
m_titleView(KDFont::SmallFont, I18n::Message::ComputeProbability, 0.5f, 0.5f, Palette::GreyDark, Palette::WallScreen),
|
||||
m_selectableTableView(selectableTableView),
|
||||
@@ -293,7 +292,7 @@ void CalculationController::updateTitle() {
|
||||
}
|
||||
currentChar += UTF8Decoder::CodePointToChars(' ', m_titleBuffer + currentChar, k_titleBufferSize - currentChar);
|
||||
}
|
||||
m_titleBuffer[minInt(currentChar, k_titleBufferSize) - 1] = 0;
|
||||
m_titleBuffer[std::min(currentChar, k_titleBufferSize) - 1] = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user