fix(HtmlParser): correctly remove an item from the space struct when requested from a callback
while here: - implement the removing algorithm for the compact_mode
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008-2023, Tomasz Sowa
|
||||
* Copyright (c) 2008-2024, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -2223,6 +2223,21 @@ void Space::remove(const std::wstring & field)
|
||||
}
|
||||
|
||||
|
||||
void Space::remove(ObjectType::iterator & iterator)
|
||||
{
|
||||
if( type == type_object )
|
||||
{
|
||||
if( iterator != value.value_object.end() )
|
||||
{
|
||||
delete iterator->second;
|
||||
iterator->second = nullptr;
|
||||
|
||||
value.value_object.erase(iterator);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Space::remove(size_t table_index)
|
||||
{
|
||||
if( type == type_table && table_index < value.value_table.size() )
|
||||
|
Reference in New Issue
Block a user