Commit f7069237 authored by Nick Korovaiko's avatar Nick Korovaiko Committed by Scott Cyphers

use empty consistently instead of size == 0 checks (#1126)

parent ab325ce6
...@@ -112,7 +112,7 @@ void ngraph::replace_node(std::shared_ptr<Node> target, std::shared_ptr<Node> re ...@@ -112,7 +112,7 @@ void ngraph::replace_node(std::shared_ptr<Node> target, std::shared_ptr<Node> re
throw ngraph_error("Result nodes cannot be replaced."); throw ngraph_error("Result nodes cannot be replaced.");
} }
if (target->get_users().size() == 0) if (target->get_users().empty())
{ {
throw ngraph_error("replacing an unreachable node"); throw ngraph_error("replacing an unreachable node");
} }
......
...@@ -116,7 +116,7 @@ void ngraph::runtime::cpu::pass::ConcatInputs::concat_lstm_inputs() ...@@ -116,7 +116,7 @@ void ngraph::runtime::cpu::pass::ConcatInputs::concat_lstm_inputs()
{ {
NGRAPH_DEBUG << "Replacing 1st output Lstm node " << goe_node->get_name() NGRAPH_DEBUG << "Replacing 1st output Lstm node " << goe_node->get_name()
<< " with " << lstm_ht_out->get_name(); << " with " << lstm_ht_out->get_name();
if (goe_node->get_users().size() > 0) if (!goe_node->get_users().empty())
{ {
ngraph::replace_node(goe_node, lstm_ht_out); ngraph::replace_node(goe_node, lstm_ht_out);
} }
......
...@@ -785,7 +785,7 @@ void ngraph::runtime::cpu::pass::MultiLayerRNNFusion::construct_multi_layer_rnn_ ...@@ -785,7 +785,7 @@ void ngraph::runtime::cpu::pass::MultiLayerRNNFusion::construct_multi_layer_rnn_
for (auto& rnn_goes : rnn_node->get_users()) for (auto& rnn_goes : rnn_node->get_users())
{ {
NGRAPH_DEBUG << "rnn_goes: " << rnn_goes->get_name(); NGRAPH_DEBUG << "rnn_goes: " << rnn_goes->get_name();
if (rnn_goes->get_users().size() == 0) if (rnn_goes->get_users().empty())
{ {
continue; continue;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment