mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-21 14:20:56 +00:00
fix(core): drop the unused Config forward declaration from HashRouter.h
HashRouter.h declared `class Config;` and never referred to it: the only other mentions of the name in the file are two prose comments. Nothing that includes this header depends on it either -- of the eighteen files that do, the only one that names the type needs the full definition and includes it itself. The declaration is vestigial, left behind when setupHashRouter() moved to setup_HashRouter.h, which carries its own. Left alone it is now an error rather than dead code. This branch's SlotCensus work made Overlay.h include PeerfinderManager.h, because Overlay::slotCensus() returns a SlotCensus by value. ValidatorList.cpp includes both Overlay.h and HashRouter.h, and is the one translation unit that reaches them without also pulling in xrpld/core/Config.h -- so PeerFinder::Config and this declaration meet there, and bugprone-forward-declaration-namespace reports a declaration with no definition beside a same-named class in another namespace. Removing it rather than including the real header: xrpl::Config lives in xrpld, so an include would point the xrpl.libxrpl.core layer at the layer above it.
This commit is contained in:
@@ -73,8 +73,6 @@ any(HashRouterFlags flags)
|
||||
return static_cast<std::underlying_type_t<HashRouterFlags>>(flags) != 0;
|
||||
}
|
||||
|
||||
class Config;
|
||||
|
||||
/**
|
||||
* Routing table for objects identified by hash.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user