cleanup + minor fixes
This commit is contained in:
+2
-3
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user