mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 19:03:07 +02:00
Eval: Eliminated string def
This commit is contained in:
parent
c7f2739dda
commit
ae27a1b343
1 changed files with 3 additions and 5 deletions
|
@ -34,8 +34,6 @@
|
|||
#include <shared.h>
|
||||
#include <format.h>
|
||||
|
||||
#define STRING_EVAL_NO_EVAL "The expression could not be evaluated."
|
||||
|
||||
extern Task& contextTask;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -232,7 +230,7 @@ void Eval::evaluatePostfixStack (
|
|||
token.first == "!")
|
||||
{
|
||||
if (values.size () < 1)
|
||||
throw std::string (STRING_EVAL_NO_EVAL);
|
||||
throw std::string ("The expression could not be evaluated.");
|
||||
|
||||
Variant right = values.back ();
|
||||
values.pop_back ();
|
||||
|
@ -245,7 +243,7 @@ void Eval::evaluatePostfixStack (
|
|||
token.first == "_neg_")
|
||||
{
|
||||
if (values.size () < 1)
|
||||
throw std::string (STRING_EVAL_NO_EVAL);
|
||||
throw std::string ("The expression could not be evaluated.");
|
||||
|
||||
Variant right = values.back ();
|
||||
values.pop_back ();
|
||||
|
@ -269,7 +267,7 @@ void Eval::evaluatePostfixStack (
|
|||
else if (token.second == Lexer::Type::op)
|
||||
{
|
||||
if (values.size () < 2)
|
||||
throw std::string (STRING_EVAL_NO_EVAL);
|
||||
throw std::string ("The expression could not be evaluated.");
|
||||
|
||||
Variant right = values.back ();
|
||||
values.pop_back ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue