From da72435f3a21e02ff6f80b57958b8a2136e856ce Mon Sep 17 00:00:00 2001 From: Li Cao Date: Tue, 30 Apr 2024 05:15:50 +0800 Subject: [PATCH] [cli] fix namespace usage (#10088) The method `ParseEnableOrDisable` has been moved to the `Utils` class and these components inherit the `Utils` class so there is no need to add namespace. --- src/cli/cli_dns.cpp | 2 +- src/cli/cli_srp_client.cpp | 4 ++-- src/cli/cli_udp.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cli/cli_dns.cpp b/src/cli/cli_dns.cpp index 5148bb36b..9e36e2751 100644 --- a/src/cli/cli_dns.cpp +++ b/src/cli/cli_dns.cpp @@ -94,7 +94,7 @@ template <> otError Dns::Process(Arg aArgs[]) { bool enable; - SuccessOrExit(error = Interpreter::ParseEnableOrDisable(aArgs[0], enable)); + SuccessOrExit(error = ParseEnableOrDisable(aArgs[0], enable)); otDnsSetNameCompressionEnabled(enable); } diff --git a/src/cli/cli_srp_client.cpp b/src/cli/cli_srp_client.cpp index a5301f390..e26951fe1 100644 --- a/src/cli/cli_srp_client.cpp +++ b/src/cli/cli_srp_client.cpp @@ -89,7 +89,7 @@ template <> otError SrpClient::Process(Arg aArgs[]) ExitNow(); } - SuccessOrExit(error = Interpreter::ParseEnableOrDisable(aArgs[0], enable)); + SuccessOrExit(error = ParseEnableOrDisable(aArgs[0], enable)); /** * @cli srp client autostart enable @@ -173,7 +173,7 @@ template <> otError SrpClient::Process(Arg aArgs[]) ExitNow(); } - error = Interpreter::ParseEnableOrDisable(aArgs[0], mCallbackEnabled); + error = ParseEnableOrDisable(aArgs[0], mCallbackEnabled); exit: return error; diff --git a/src/cli/cli_udp.cpp b/src/cli/cli_udp.cpp index 299be12ef..b4c77fe3f 100644 --- a/src/cli/cli_udp.cpp +++ b/src/cli/cli_udp.cpp @@ -360,7 +360,7 @@ template <> otError UdpExample::Process(Arg aArgs[]) */ else { - error = Interpreter::ParseEnableOrDisable(aArgs[0], mLinkSecurityEnabled); + error = ParseEnableOrDisable(aArgs[0], mLinkSecurityEnabled); } return error;