C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html

This commit is contained in:
Arash Partow 2014-12-10 08:06:54 +11:00
parent 5631cc5b8e
commit 7b70dad4cc
2 changed files with 14 additions and 3 deletions

View File

@ -5659,9 +5659,13 @@ namespace exprtk
{
n0_e.first = false;
if (!details::is_variable_node(n0_e.second))
if (
!is_variable_node(n0_e.second) &&
!is_string_node (n0_e.second)
)
{
delete n0_e.second;
n0_e.second = expression_node_ptr(0);
}
}
@ -5669,9 +5673,13 @@ namespace exprtk
{
n1_e.first = false;
if (!details::is_variable_node(n1_e.second))
if (
!is_variable_node(n1_e.second) &&
!is_string_node (n1_e.second)
)
{
delete n1_e.second;
n1_e.second = expression_node_ptr(0);
}
}
}
@ -6387,7 +6395,7 @@ namespace exprtk
~generic_string_range_node()
{
range_.free();
base_range_.free();
if (branch_ && branch_deletable_)
{

View File

@ -426,6 +426,9 @@ of C++ compilers:
| | 3. x += y[:i + j] + 'abc' |
| | 4. x += '0123456789'[2:7] |
+----------+---------------------------------------------------------+
| <=> | Swap the values of x and y. Where x and y are mutable |
| | strings. (eg: x <=> y) |
+----------+---------------------------------------------------------+
| [] | The string size operator returns the size of the string |
| | being actioned. |
| | eg: |