Performance

- When there is only one element in A3, no point firing up the Dijkstra
  shunt of the infix processing.
This commit is contained in:
Paul Beckingham
2012-07-08 14:38:13 -04:00
parent 99b0c5568a
commit b702251431

View File

@@ -892,6 +892,9 @@ const A3 A3::tokenize (const A3& input) const
//
const A3 A3::infix (const A3& input) const
{
if (input.size () == 1)
return input;
Arg previous ("?", Arg::cat_op);
A3 modified;
@@ -1229,6 +1232,9 @@ const A3 A3::sequence (const A3& input) const
//
const A3 A3::postfix (const A3& input) const
{
if (input.size () == 1)
return input;
A3 converted;
converted._limit = input._limit;