mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps] Move assert to where it matters
This commit is contained in:
committed by
LeaNumworks
parent
312a19e760
commit
d476e7944d
@@ -26,7 +26,6 @@ public:
|
||||
constexpr static int k_parenthesedThetaArgumentByteLength = 4;
|
||||
constexpr static int k_parenthesedXNTArgumentByteLength = 3;
|
||||
constexpr static int k_maxNameWithArgumentSize = Poincare::SymbolAbstract::k_maxNameSize + k_parenthesedThetaArgumentByteLength; /* Function name and null-terminating char + "(θ)" */;
|
||||
static_assert(k_maxNameWithArgumentSize > Poincare::SymbolAbstract::k_maxNameSize, "Forgot argument's size?");
|
||||
static bool BaseNameCompliant(const char * baseName, NameNotCompliantError * error = nullptr);
|
||||
|
||||
// Constructors
|
||||
|
||||
@@ -103,6 +103,7 @@ void VariableBoxController::willDisplayCellForIndex(HighlightCell * cell, int in
|
||||
char symbolName[Shared::Function::k_maxNameWithArgumentSize];
|
||||
size_t symbolLength = 0;
|
||||
if (m_currentPage == Page::Expression) {
|
||||
static_assert(Shared::Function::k_maxNameWithArgumentSize > Poincare::SymbolAbstract::k_maxNameSize, "Forgot argument's size?");
|
||||
symbolLength = SymbolAbstract::TruncateExtension(symbolName, record.fullName(), SymbolAbstract::k_maxNameSize);
|
||||
} else {
|
||||
assert(m_currentPage == Page::Function);
|
||||
|
||||
Reference in New Issue
Block a user