MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / Delete

Method Delete

src/ObjectModel/Variable.cpp:189–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189void VariableSet::Delete(const char *_ecv_array str) noexcept
190{
191 LinkedVariable *prev = nullptr;
192 for (LinkedVariable *lv = root; lv != nullptr; lv = lv->next)
193 {
194 auto vname = lv->v.GetName();
195 if (strcmp(vname.Ptr(), str) == 0)
196 {
197 if (prev == nullptr)
198 {
199 root = lv->next;
200 }
201 else
202 {
203 prev->next = lv->next;
204 }
205 delete lv;
206 break;
207 }
208 prev = lv;
209 }
210}
211
212void VariableSet::Clear() noexcept
213{

Callers 2

ReleaseMethod · 0.45
~VariableMethod · 0.45

Calls 1

GetNameMethod · 0.45

Tested by

no test coverage detected