DBG: vector::clear() is redundant right before destructor
This commit is contained in:
parent
b999f58416
commit
e8a39e7e79
|
@ -21,10 +21,7 @@ void varsetvalue(VAR* Var, VAR_VALUE* Value)
|
||||||
{
|
{
|
||||||
// VAR_STRING needs to be freed before destroying it
|
// VAR_STRING needs to be freed before destroying it
|
||||||
if(Var->value.type == VAR_STRING)
|
if(Var->value.type == VAR_STRING)
|
||||||
{
|
|
||||||
Var->value.u.data->clear();
|
|
||||||
delete Var->value.u.data;
|
delete Var->value.u.data;
|
||||||
}
|
|
||||||
|
|
||||||
// Replace all information in the struct
|
// Replace all information in the struct
|
||||||
memcpy(&Var->value, Value, sizeof(VAR_VALUE));
|
memcpy(&Var->value, Value, sizeof(VAR_VALUE));
|
||||||
|
@ -273,7 +270,6 @@ bool varset(const char* Name, const char* Value, bool ReadOnly)
|
||||||
// Try to register variable
|
// Try to register variable
|
||||||
if(!varset(Name, &varValue, ReadOnly))
|
if(!varset(Name, &varValue, ReadOnly))
|
||||||
{
|
{
|
||||||
varValue.u.data->clear();
|
|
||||||
delete varValue.u.data;
|
delete varValue.u.data;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue