Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] Fix coverity issues #24838

Merged
merged 2 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/src/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ void ov::Model::replace_parameter(size_t parameter_index, const shared_ptr<ov::o
}

void ov::Model::set_topological_sort(topological_sort_t sorter) {
m_topological_sorter = sorter;
m_topological_sorter = std::move(sorter);
// reset topological nodes order cache as new sorter can have different behaviour
m_shared_rt_info->set_use_topological_cache(false);
}
Expand Down
10 changes: 5 additions & 5 deletions src/core/src/pass/visualize_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ bool ov::pass::VisualizeTree::run_on_model(const std::shared_ptr<ov::Model>& f)

size_t fake_node_ctr = 0;

traverse_nodes(f, [&](std::shared_ptr<Node> node) {
traverse_nodes(f, [&](const std::shared_ptr<Node>& node) {
add_node_arguments(node, height_maps, fake_node_ctr);
});

Expand All @@ -281,8 +281,8 @@ bool ov::pass::VisualizeTree::run_on_model(const std::shared_ptr<ov::Model>& f)

ov::pass::VisualizeTree::VisualizeTree(const std::string& file_name, node_modifiers_t nm, bool dot_only)
: m_name{file_name},
m_node_modifiers{nm},
m_dot_only(dot_only) {}
m_node_modifiers{std::move(nm)},
m_dot_only{dot_only} {}

void ov::pass::VisualizeTree::add_node_arguments(std::shared_ptr<Node> node,
std::unordered_map<Node*, HeightMap>& height_maps,
Expand All @@ -297,7 +297,7 @@ void ov::pass::VisualizeTree::add_node_arguments(std::shared_ptr<Node> node,
std::string("color=\"") + (arg->description() == "Parameter" ? "blue" : "black") + std::string("\"");
std::vector<std::string> attributes{"shape=\"box\"",
"style=\"dashed\"",
color,
std::move(color),
std::string("label=\"") + get_node_name(arg) + std::string("\n") +
get_constant_value(arg) + std::string("\"")};

Expand Down Expand Up @@ -344,8 +344,8 @@ void ov::pass::VisualizeTree::add_node_arguments(std::shared_ptr<Node> node,
std::string ov::pass::VisualizeTree::add_attributes(std::shared_ptr<Node> node) {
std::string rc;
if (m_nodes_with_attributes.find(node) == m_nodes_with_attributes.end()) {
m_nodes_with_attributes.insert(node);
rc = get_attributes(node);
m_nodes_with_attributes.insert(std::move(node));
}
return rc;
}
Expand Down
Loading