Fix build with latest ndn-cxx
Change-Id: I850fc92a0bb50632ba5b5bacab6cedb321754db1
diff --git a/src/handles/command-base-handle.hpp b/src/handles/command-base-handle.hpp
index 584c6b6..995ea48 100644
--- a/src/handles/command-base-handle.hpp
+++ b/src/handles/command-base-handle.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California.
+ * Copyright (c) 2014-2025, Regents of the University of California.
*
* This file is part of NDN repo-ng (Next generation of NDN repository).
* See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -21,11 +21,10 @@
#define REPO_HANDLES_COMMAND_BASE_HANDLE_HPP
#include "common.hpp"
-
-#include "storage/repo-storage.hpp"
-#include "repo-command-response.hpp"
-#include "repo-command-parameter.hpp"
#include "repo-command.hpp"
+#include "repo-command-parameter.hpp"
+#include "repo-command-response.hpp"
+#include "storage/repo-storage.hpp"
#include <ndn-cxx/mgmt/dispatcher.hpp>
#include <ndn-cxx/security/validator.hpp>
@@ -46,14 +45,13 @@
template<typename T>
bool
- validateParameters(const ndn::mgmt::ControlParameters& parameters)
+ validateParameters(const ndn::mgmt::ControlParametersBase& parameters) const
{
- const auto* castParams = dynamic_cast<const RepoCommandParameter*>(¶meters);
- BOOST_ASSERT(castParams != nullptr);
+ const auto& castParams = dynamic_cast<const RepoCommandParameter&>(parameters);
T command;
try {
- command.validateRequest(*castParams);
+ command.validateRequest(castParams);
}
catch (const RepoCommand::ArgumentError&) {
return false;