cleanup + minor fixes

This commit is contained in:
2026-10-15 16:42:52 +03:00
parent ab4afb48e7
commit 79a96aea77
4 changed files with 34 additions and 200 deletions
+2 -3
View File
@@ -52,6 +52,7 @@ public:
}
explicit TokenValue(void)
: s(std::shared_ptr<std::string>())
{
}
@@ -144,6 +145,7 @@ public:
switch (t)
{
case VAR:
new(&v.s) std::shared_ptr<std::string>;
v.s = other.v.s;
break;
case CONST:
@@ -174,7 +176,6 @@ public:
return v.s;
case CONST:
{
char buffer[128] = {0};
return std::make_shared<std::string>((std::ostringstream() << v.d).str());
}
case OPERATOR:
@@ -186,8 +187,6 @@ public:
std::shared_ptr<std::string> to_math_str(void) const
{
char buffer[128] = {0};
switch (t)
{
case VAR: