From 1de9a4b96ad00b663a7068918e7fd78f715b6010 Mon Sep 17 00:00:00 2001 From: zmw Date: Sat, 7 Jun 2025 14:53:23 +0800 Subject: [PATCH] Fix assert string to bool Issue: https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/ICDBZ7 Description: Fix assert string to bool Signed-off-by: zmw --- ets2panda/lsp/src/code_fix_provider.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ets2panda/lsp/src/code_fix_provider.cpp b/ets2panda/lsp/src/code_fix_provider.cpp index 1843912767..0aacb84467 100644 --- a/ets2panda/lsp/src/code_fix_provider.cpp +++ b/ets2panda/lsp/src/code_fix_provider.cpp @@ -28,9 +28,8 @@ namespace ark::es2panda::lsp { void CodeFixProvider::RegisterCodeFix(const std::string &aliasName, std::unique_ptr registration) { - if (aliasName.empty()) { - ASSERT("Alias name cannot be empty"); - } + (void)aliasName; + ASSERT(!aliasName.empty()); auto shared = std::shared_ptr(std::move(registration)); for (auto error : shared->GetErrorCodes()) { -- Gitee