1
0
Fork 0

DBG: vector::clear() is redundant right before destructor

This commit is contained in:
Nukem 2015-07-14 21:10:00 -04:00
parent b999f58416
commit e8a39e7e79
1 changed files with 0 additions and 4 deletions

View File

@ -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;
} }