mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
+TCore: default value parameter added to CalcContext::EvaluateBool
git-svn-id: svn://ultimatepp.org/upp/trunk@3476 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
d5d7c1ff3a
commit
13dab0fdd7
2 changed files with 3 additions and 3 deletions
|
|
@ -625,10 +625,10 @@ Time CalcContext::EvaluateTime(String expr)
|
|||
return !!node ? node->CalcTime(*this) : Time(Null);
|
||||
}
|
||||
|
||||
bool CalcContext::EvaluateBool(String expr)
|
||||
bool CalcContext::EvaluateBool(String expr, bool null_value)
|
||||
{
|
||||
CalcNodePtr node = CalcParser().ScanVoid(expr);
|
||||
return !!node && node->CalcBool(*this);
|
||||
return !!node ? node->CalcBool(*this) : null_value;
|
||||
}
|
||||
|
||||
String CalcContext::OptimizeConstant(String expr)
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ public:
|
|||
int EvaluateInt(String expr);
|
||||
Date EvaluateDate(String expr);
|
||||
Time EvaluateTime(String expr);
|
||||
bool EvaluateBool(String expr);
|
||||
bool EvaluateBool(String expr, bool null_value = false);
|
||||
|
||||
String OptimizeConstant(String expr);
|
||||
CalcNodePtr OptimizeConstant(CalcNodePtr src);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue