Commit 14d74e83 authored by Adam Procter's avatar Adam Procter

Fix compiler warnings

parent 5b405c16
......@@ -35,7 +35,7 @@ bool pass::DumpSorted::run_on_module(vector<shared_ptr<ngraph::Function>>& funct
{
for (shared_ptr<Function> f : functions)
{
for (const shared_ptr<Node> node : f->get_ordered_ops())
for (const shared_ptr<Node>& node : f->get_ordered_ops())
{
out << node->get_name() << "(";
vector<string> inputs;
......
......@@ -1016,7 +1016,9 @@ void ExternalFunction::compile(FunctionMap& function_map)
auto op_map = get_op_map();
for (shared_ptr<Node> node : m_function->get_ordered_ops())
{
auto handler_it = op_map.find(type_index(typeid(*node)));
auto& n = *node; // Work around a compiler warning (*node inside typeid may have effects
// with shared pointers, which is fine here but clang doesn't like it.)
auto handler_it = op_map.find(type_index(typeid(n)));
if (handler_it == op_map.end())
{
throw ngraph_error("Unhandled op during code generation");
......
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