cfg: remove string::get()

This commit is contained in:
DH 2025-02-28 20:59:45 +03:00 committed by Megamouse
parent bbb682a440
commit 3080b55d02
2 changed files with 1 additions and 16 deletions

View file

@ -554,21 +554,6 @@ namespace cfg
return *m_value.load().get();
}
std::pair<const std::string&, shared_ptr<std::string>> get() const
{
auto v = m_value.load();
if (auto s = v.get())
{
return {*s, std::move(v)};
}
else
{
static const std::string _empty;
return {_empty, {}};
}
}
void from_default() override;
std::string to_string() const override

View file

@ -121,7 +121,7 @@ void gdb_thread::start_server()
// IPv4 address:port in format 127.0.0.1:2345
static const std::regex ipv4_regex("^([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})\\:([0-9]{1,5})$");
auto [sname, sshared] = g_cfg.misc.gdb_server.get();
auto sname = g_cfg.misc.gdb_server.to_string();
if (sname[0] == '\0')
{