refactor: Change config section and key string literals into constants (#7095)

Co-authored-by: Bart <11445373+bthomee@users.noreply.github.com>
This commit is contained in:
Bart
2026-06-09 10:58:21 -04:00
committed by GitHub
parent c9769d1add
commit c552eb333f
83 changed files with 1262 additions and 1029 deletions

View File

@@ -2,8 +2,9 @@
#include <xrpld/core/Config.h>
#include <xrpl/basics/BasicConfig.h>
#include <xrpl/basics/contract.h>
#include <xrpl/config/BasicConfig.h>
#include <xrpl/config/Constants.h>
#include <xrpl/json/json_reader.h>
#include <xrpl/json/json_value.h>
#include <xrpl/json/to_string.h>
@@ -62,9 +63,9 @@ class WSClientImpl : public WSClient
{
auto& log = std::cerr;
ParsedPort common;
parsePort(common, cfg["server"], log);
parsePort(common, cfg[Sections::kServer], log);
auto const ps = v2 ? "ws2" : "ws";
for (auto const& name : cfg.section("server").values())
for (auto const& name : cfg.section(Sections::kServer).values())
{
if (!cfg.exists(name))
continue;