xml-support.c: Use std::vector
authorPedro Alves <palves@redhat.com>
Tue, 18 Apr 2017 20:39:24 +0000 (21:39 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 18 Apr 2017 22:48:15 +0000 (23:48 +0100)
commita7fc9b6193f830293066479aa439cea924418393
tree7d9bbe24cb0ddf0e67deef07134dce712502b7ae
parent010151c9146eb2a299686e41c714e57c344be8e8
xml-support.c: Use std::vector

scope_level::scope_level needed both a move ctor and a dtor explicitly
coded, but those will be eliminated in a following patch.

gdb/ChangeLog:
2017-04-18  Pedro Alves  <palves@redhat.com>

* xml-support.c: Include <vector>.
(scope_level::scope_level(const gdb_xml_element *))
(scope_level::scope_level(scope_level&&)): New.
(scope_level::~scope_level): New.
(scope_level_s): Delete.
(gdb_xml_parser::scopes): Now a std::vector.
(gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
Use std::vector.
(gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
scope cleanup code.
(gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
of the scopes member.  Use std::vector::emplace_back.
gdb/ChangeLog
gdb/xml-support.c