diff --git a/src/space/spaceparser.cpp b/src/space/spaceparser.cpp index 7481f00..9f79f9a 100644 --- a/src/space/spaceparser.cpp +++ b/src/space/spaceparser.cpp @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2012-2022, Tomasz Sowa + * Copyright (c) 2012-2023, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -691,7 +691,7 @@ void SpaceParser::parse_key_value_pairs(Space * space) if( object_items_limit == 0 || !space->is_object() || (space->object_size() < object_items_limit) ) { - Space & new_space = space->add(token.c_str(), new Space()); + Space & new_space = space->add_empty_space(token.c_str()); if( all_items_limit == 0 || current_items_counter++ < all_items_limit ) { @@ -762,11 +762,11 @@ void SpaceParser::parse_values_list(Space * space) { if( table_items_limit == 0 || !space->is_table() || (space->table_size() < table_items_limit) ) { - Space * new_space = &space->add(new Space()); + Space & new_space = space->add_empty_space(); if( all_items_limit == 0 || current_items_counter++ < all_items_limit ) { - parse(new_space, false, true); + parse(&new_space, false, true); } else {