Quote node names in aos_graph_nodes
Otherwise certain node names were failing to render with dot.
Change-Id: I2df3cf37dac20bdc3ed1f9f2e5ebb32aed38720c
diff --git a/aos/aos_graph_nodes.cc b/aos/aos_graph_nodes.cc
index 952c6b5..90778d1 100644
--- a/aos/aos_graph_nodes.cc
+++ b/aos/aos_graph_nodes.cc
@@ -84,8 +84,8 @@
for (const aos::Connection *connection :
*channel->destination_nodes()) {
VLOG(1) << "Destination Node: " << connection->name()->string_view();
- graph_out << "\t" << source_node_name << " -> "
- << connection->name()->c_str() << " [label=\""
+ graph_out << "\t\"" << source_node_name << "\" -> \""
+ << connection->name()->c_str() << "\" [label=\""
<< channel->name()->c_str() << "\\n"
<< type_name << "\" color=\"" << color_map[source_node_name]
<< "\"];" << std::endl;
@@ -95,8 +95,8 @@
}
// Write out all the nodes at the end, with their respective colors
- for (const auto node_color : color_map) {
- graph_out << "\t" << node_color.first << " [color=\"" << node_color.second
+ for (const auto &node_color : color_map) {
+ graph_out << "\t\"" << node_color.first << "\" [color=\"" << node_color.second
<< "\"];" << std::endl;
}