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

@@ -4,8 +4,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>
@@ -40,8 +41,8 @@ class JSONRPCClient : public AbstractClient
{
auto& log = std::cerr;
ParsedPort common;
parsePort(common, cfg["server"], log);
for (auto const& name : cfg.section("server").values())
parsePort(common, cfg[Sections::kServer], log);
for (auto const& name : cfg.section(Sections::kServer).values())
{
if (!cfg.exists(name))
continue;