main: don't insert null function pointers into the legacy commands map
This is purely aesthetically bothering me, but [] inserting stuff into the map is such a C++ coded design decision and we don't intend to mutate it here so we probably should not do it. Change-Id: Idf37c51175b031fb396e8fd53dc8fe6f2039fb55
This commit is contained in:
+2
-2
@@ -488,9 +488,9 @@ int mainWrapped(AsyncIoRoot & aio, int argc, char ** argv)
|
||||
|
||||
{
|
||||
registerLegacyCommands();
|
||||
auto legacy = (*LegacyCommandRegistry::commands)[programName];
|
||||
auto legacy = nix::get(*LegacyCommandRegistry::commands, programName);
|
||||
if (legacy) {
|
||||
return legacy(
|
||||
return (*legacy)(
|
||||
aio,
|
||||
std::string(baseNameOf(argv[0])),
|
||||
Strings(argv + 1, argv + argc),
|
||||
|
||||
Reference in New Issue
Block a user