Use gdb set and map in TUI

This changes the TUI to use gdb::unordered_map and gdb::unordered_set
rather than the std:: variants.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2025-02-24 15:36:28 -07:00
parent d9c531fd64
commit d8a30dd2a6
2 changed files with 4 additions and 5 deletions

View File

@@ -24,7 +24,7 @@
#include "frame.h"
#include "cli/cli-decode.h"
#include "cli/cli-utils.h"
#include <unordered_set>
#include "gdbsupport/unordered_set.h"
#include "tui/tui.h"
#include "tui/tui-command.h"
@@ -1221,7 +1221,7 @@ tui_new_layout_command (const char *spec, int from_tty)
std::vector<std::unique_ptr<tui_layout_split>> splits;
splits.emplace_back (new tui_layout_split (is_vertical));
std::unordered_set<std::string> seen_windows;
gdb::unordered_set<std::string> seen_windows;
while (true)
{
spec = skip_spaces (spec);

View File

@@ -27,8 +27,7 @@
#include "tui/tui.h"
#include "tui/tui-data.h"
#include "gdbsupport/iterator-range.h"
#include <unordered_map>
#include "gdbsupport/unordered_map.h"
/* Values that can be returned when handling a request to adjust a
window's size. */
@@ -368,7 +367,7 @@ typedef std::function<tui_win_info * (const char *name)> window_factory;
/* The type for a data structure that maps a window name to that window's
factory function. */
typedef std::unordered_map<std::string, window_factory> window_types_map;
typedef gdb::unordered_map<std::string, window_factory> window_types_map;
/* Register a new TUI window type. NAME is the name of the window
type. FACTORY is a function that can be called to instantiate the