Use more descriptive variable name.
authorAlberto Gonzalez <boqwxp@airmail.cc>
Mon, 6 Apr 2020 14:48:27 +0000 (14:48 +0000)
committerAlberto Gonzalez <boqwxp@airmail.cc>
Mon, 6 Apr 2020 14:48:27 +0000 (14:48 +0000)
Co-Authored-By: whitequark <whitequark@whitequark.org>
passes/cmds/show.cc

index d355c52bec8348b71b3281055a1aa27d9d725c95..155ed0fcd02732d09765b24ffdec4e475a745452 100644 (file)
@@ -364,20 +364,20 @@ struct ShowWorker
                std::set<std::string> all_sources, all_sinks;
 
                std::map<std::string, std::string> wires_on_demand;
-               for (auto w : module->selected_wires()) {
+               for (auto wire : module->selected_wires()) {
                        const char *shape = "diamond";
-                       if (w->port_input || w->port_output)
+                       if (wire->port_input || wire->port_output)
                                shape = "octagon";
-                       if (w->name[0] == '\\') {
+                       if (wire->name[0] == '\\') {
                                fprintf(f, "n%d [ shape=%s, label=\"%s\", %s, fontcolor=\"black\" ];\n",
-                                               id2num(w->name), shape, findLabel(w->name.str()),
-                                               nextColor(RTLIL::SigSpec(w), "color=\"black\"").c_str());
-                               if (w->port_input)
-                                       all_sources.insert(stringf("n%d", id2num(w->name)));
-                               else if (w->port_output)
-                                       all_sinks.insert(stringf("n%d", id2num(w->name)));
+                                               id2num(wire->name), shape, findLabel(wire->name.str()),
+                                               nextColor(RTLIL::SigSpec(wire), "color=\"black\"").c_str());
+                               if (wire->port_input)
+                                       all_sources.insert(stringf("n%d", id2num(wire->name)));
+                               else if (wire->port_output)
+                                       all_sinks.insert(stringf("n%d", id2num(wire->name)));
                        } else {
-                               wires_on_demand[stringf("n%d", id2num(w->name))] = w->name.str();
+                               wires_on_demand[stringf("n%d", id2num(wire->name))] = wire->name.str();
                        }
                }