Skip to content

Commit 10b9ae5

Browse files
facontidavideclaude
andcommitted
Fix clang-tidy readability-implicit-bool-conversion warnings
Use explicit != nullptr comparisons for pointer-to-bool conversions flagged by clang-tidy. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b0a09ad commit 10b9ae5

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/tree_node.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ AnyPtrLocked BT::TreeNode::getLockedPortContent(const std::string& key)
481481
{
482482
const auto bb_key = std::string(*remapped_key);
483483
auto result = _p->config.blackboard->getAnyLocked(bb_key);
484-
if(!result && _p->config.manifest)
484+
if(!result && _p->config.manifest != nullptr)
485485
{
486486
// Entry doesn't exist yet. Create it using the port's type info
487487
// from the manifest so that getLockedPortContent works even when

src/xml_parsing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ TreeNode::Ptr XMLParser::PImpl::createNodeFromXML(const XMLElement* element,
870870
// If a substitution rule replaced the SubTree with a different node
871871
// (e.g. a TestNode), the dynamic_cast will return nullptr.
872872
auto subtree_node = dynamic_cast<SubTreeNode*>(new_node.get());
873-
if(subtree_node)
873+
if(subtree_node != nullptr)
874874
{
875875
subtree_node->setSubtreeID(type_ID);
876876
}

0 commit comments

Comments
 (0)