diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-09-09 15:30:03 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-09-09 15:30:03 +0300 |
commit | f6c9dc269cd4478760e77ac607980e165cbea09e (patch) | |
tree | 8f320026c1289ece70a47b80088906f11c46397f /src/GCodes/GCodeBuffer/StringParser.cpp | |
parent | 4191a4c83df2cb7fa80ed2d97ec84f43bdac56bd (diff) |
Prepare to refector class VariableSet
Diffstat (limited to 'src/GCodes/GCodeBuffer/StringParser.cpp')
-rw-r--r-- | src/GCodes/GCodeBuffer/StringParser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/GCodes/GCodeBuffer/StringParser.cpp b/src/GCodes/GCodeBuffer/StringParser.cpp index a3daa726..c4841980 100644 --- a/src/GCodes/GCodeBuffer/StringParser.cpp +++ b/src/GCodes/GCodeBuffer/StringParser.cpp @@ -657,7 +657,7 @@ void StringParser::ProcessVarOrGlobalCommand(bool isGlobal) THROWS(GCodeExceptio SkipWhiteSpace(); ExpressionParser parser(gb, gb.buffer + readPointer, gb.buffer + ARRAY_SIZE(gb.buffer), commandIndent + readPointer); ExpressionValue ev = parser.Parse(); - vset->Insert(new Variable(varName.c_str(), ev, (isGlobal) ? 0 : gb.CurrentFileMachineState().GetBlockNesting())); + vset->InsertNew(varName.c_str(), ev, (isGlobal) ? 0 : gb.CurrentFileMachineState().GetBlockNesting()); if (isGlobal) { reprap.GlobalUpdated(); @@ -1875,7 +1875,7 @@ void StringParser::AddParameters(VariableSet& vs, int codeRunning) noexcept ev.Set(nullptr); } char paramName[2] = { letter, 0 }; - vs.Insert(new Variable(paramName, ev, -1)); + vs.InsertNew(paramName, ev, -1); } } ); |