Skip to content

Commit

Permalink
yaml_utils.h nullptr comparison fixup (#755)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwason authored Apr 24, 2022
1 parent ac12304 commit 39d20ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tesseract_common/include/tesseract_common/yaml_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ struct convert<tesseract_common::PluginInfo>

rhs.class_name = node["class"].as<std::string>();

if (node["config"] != nullptr)
if (node["config"]) // NOLINT
rhs.config = node["config"];

return true;
Expand All @@ -114,10 +114,10 @@ struct convert<tesseract_common::PluginInfoContainer>

static bool decode(const Node& node, tesseract_common::PluginInfoContainer& rhs)
{
if (node["default"] != nullptr)
if (node["default"]) // NOLINT
rhs.default_plugin = node["default"].as<std::string>();

if (node["plugins"] == nullptr)
if (!node["plugins"]) // NOLINT
throw std::runtime_error("PluginInfoContainer, missing 'plugins' entry!");

const Node& plugins = node["plugins"];
Expand Down

0 comments on commit 39d20ef

Please sign in to comment.