FormGroup::addField() is virtual now
This commit is contained in:
+1
-1
@@ -133,7 +133,7 @@ class FormGroup: public FormField
|
||||
|
||||
void setFocus(uint8_t flag) override;
|
||||
|
||||
void addField(FormField * field, bool front = false);
|
||||
virtual void addField(FormField * field, bool front = false); // NOLINT(google-default-arguments)
|
||||
|
||||
void setFirstField(FormField * field)
|
||||
{
|
||||
|
||||
+10
-2
@@ -45,7 +45,7 @@ inline T limit(T vmin, T x, T vmax)
|
||||
return ::min(::max(vmin, x), vmax);
|
||||
}
|
||||
|
||||
inline int divRoundClosest(const int n, const int d)
|
||||
inline int divRoundClosest(int n, int d)
|
||||
{
|
||||
if (d == 0)
|
||||
return 0;
|
||||
@@ -53,10 +53,18 @@ inline int divRoundClosest(const int n, const int d)
|
||||
return ((n < 0) ^ (d < 0)) ? ((n - d/2)/d) : ((n + d/2)/d);
|
||||
}
|
||||
|
||||
inline int multDivRoundClosest(int v, int n, int d)
|
||||
{
|
||||
if (n == d)
|
||||
return v;
|
||||
else
|
||||
return divRoundClosest(v * n, d);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline T sgn(T a)
|
||||
{
|
||||
return a > 0 ? 1 : (a < 0 ? -1 : 0);
|
||||
return a > 0 ? 1 : (a < 0 ? -1 : 0);
|
||||
}
|
||||
|
||||
// TODO duplicated code
|
||||
|
||||
+2
-1
@@ -69,6 +69,7 @@ struct rect_t
|
||||
}
|
||||
};
|
||||
|
||||
static const rect_t nullRect = {0, 0, 0, 0};
|
||||
|
||||
typedef uint32_t LcdFlags;
|
||||
typedef uint16_t event_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user