added Space::remove(size_t table_index) for removing a table item

fixed: pretty printing for Space format
This commit is contained in:
2021-06-29 23:25:31 +02:00
parent 8997284b16
commit 34f1fc04cf
2 changed files with 45 additions and 35 deletions

View File

@@ -2001,6 +2001,17 @@ void Space::remove(const std::wstring & field)
}
void Space::remove(size_t table_index)
{
if( type == type_table && table_index < value.value_table.size() )
{
delete value.value_table[table_index];
value.value_table[table_index] = nullptr;
value.value_table.erase(value.value_table.begin() + table_index);
}
}
bool Space::is_equal(const wchar_t * field, const char * val) const
{
const Space * space = get_space(field);