Fix two warnings in graph lib

This commit is contained in:
Changming Sun 2019-04-02 18:01:08 -07:00
parent a196085471
commit 7af35ac1e6
2 changed files with 4 additions and 4 deletions

View file

@ -21,9 +21,9 @@ class FunctionImpl final : public Function {
FunctionImpl(const onnxruntime::Graph& graph,
const onnxruntime::NodeIndex& node_index,
const ONNX_NAMESPACE::FunctionProto* onnx_func);
~FunctionImpl();
~FunctionImpl() override;
const ONNX_NAMESPACE::OpSchema& OpSchema() const override;
const onnxruntime::Graph& Body() const override;

View file

@ -1677,7 +1677,7 @@ Status Graph::VerifyNodeAndOpMatch() {
// default value defined in operator definition if needed.
// Fill node attribute with default value specified in operator definition if any.
auto node_attributes = node.GetAttributes();
for (auto attr_def : p_op->attributes()) {
for (const auto& attr_def : p_op->attributes()) {
auto node_attr_iter = node_attributes.find(attr_def.first);
if (node_attributes.end() == node_attr_iter) {
// The attribute was not specified in the node.