Skip to content
Snippets Groups Projects
Verified Commit a61565bd authored by Houtan Bastani's avatar Houtan Bastani
Browse files

macro processor: fix bug in cast of string to bool

The incorrect `equal` template was being used.
parent 4540bed0
Branches
No related tags found
No related merge requests found
...@@ -294,10 +294,10 @@ String::cast_bool() const ...@@ -294,10 +294,10 @@ String::cast_bool() const
{ {
auto f = [](const char& a, const char& b) { return (tolower(a) == tolower(b)); }; auto f = [](const char& a, const char& b) { return (tolower(a) == tolower(b)); };
if (string tf = "true"; equal(value.begin(), value.end(), tf.begin(), f)) if (string tf = "true"; equal(value.begin(), value.end(), tf.begin(), tf.end(), f))
return make_shared<Bool>(true, env); return make_shared<Bool>(true, env);
if (string tf = "false"; equal(value.begin(), value.end(), tf.begin(), f)) if (string tf = "false"; equal(value.begin(), value.end(), tf.begin(), tf.end(), f))
return make_shared<Bool>(false, env); return make_shared<Bool>(false, env);
try try
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment