Skip to content

Commit 0959238

Browse files
committed
use snake_case for variables in draw_crit_path_elements
1 parent b9b33d8 commit 0959238

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

vpr/src/draw/draw_basic.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ void draw_crit_path_elements(const std::vector<tatum::TimingPath>& paths, const
11151115
const ezgl::color contour_color{0, 0, 0, 40};
11161116
const bool draw_crit_path_contour = g_vpr_ctx.server().draw_crit_path_contour();
11171117

1118-
auto drawFlylineTimingEdgeHelperFn = [](ezgl::renderer* renderer, const ezgl::color& color, ezgl::line_dash line_style, int line_width, float delay,
1118+
auto draw_flyline_timing_edge_helper_fn = [](ezgl::renderer* renderer, const ezgl::color& color, ezgl::line_dash line_style, int line_width, float delay,
11191119
const tatum::NodeId& prev_node, const tatum::NodeId& node, bool skip_draw_delays=false) {
11201120
renderer->set_color(color);
11211121
renderer->set_line_dash(line_style);
@@ -1127,16 +1127,16 @@ void draw_crit_path_elements(const std::vector<tatum::TimingPath>& paths, const
11271127
renderer->set_line_width(0);
11281128
};
11291129

1130-
for (const auto& [pathIndex, elementIndexes]: indexes) {
1131-
if (pathIndex < paths.size()) {
1132-
const tatum::TimingPath& path = paths[pathIndex];
1130+
for (const auto& [path_index, element_indexes]: indexes) {
1131+
if (path_index < paths.size()) {
1132+
const tatum::TimingPath& path = paths[path_index];
11331133

11341134
//Walk through the timing path drawing each edge
11351135
tatum::NodeId prev_node;
11361136
float prev_arr_time = std::numeric_limits<float>::quiet_NaN();
1137-
int elementCounter = 0;
1137+
int element_counter = 0;
11381138
for (const tatum::TimingPathElem& elem : path.data_arrival_path().elements()) {
1139-
bool drawCurrentElement = elementIndexes.empty() ? true : elementIndexes.find(elementCounter) != elementIndexes.end();
1139+
bool draw_current_element = element_indexes.empty() ? true : element_indexes.find(element_counter) != element_indexes.end();
11401140

11411141
// draw element
11421142
tatum::NodeId node = elem.node();
@@ -1146,28 +1146,28 @@ void draw_crit_path_elements(const std::vector<tatum::TimingPath>& paths, const
11461146
//any routing which corresponds to the edge
11471147
//
11481148
//We pick colors from the kelly max-contrast list, for long paths there may be repeats
1149-
ezgl::color color = kelly_max_contrast_colors[elementCounter % kelly_max_contrast_colors.size()];
1149+
ezgl::color color = kelly_max_contrast_colors[element_counter % kelly_max_contrast_colors.size()];
11501150

11511151
if (prev_node) {
11521152
float delay = arr_time - prev_arr_time;
11531153
if (draw_state->show_crit_path == DRAW_CRIT_PATH_FLYLINES
11541154
|| draw_state->show_crit_path
11551155
== DRAW_CRIT_PATH_FLYLINES_DELAYS) {
1156-
if (drawCurrentElement) {
1157-
drawFlylineTimingEdgeHelperFn(g, color, ezgl::line_dash::none, /*line_width*/4, delay, prev_node, node);
1156+
if (draw_current_element) {
1157+
draw_flyline_timing_edge_helper_fn(g, color, ezgl::line_dash::none, /*line_width*/4, delay, prev_node, node);
11581158
} else if (draw_crit_path_contour) {
1159-
drawFlylineTimingEdgeHelperFn(g, contour_color, ezgl::line_dash::none, /*line_width*/1, delay, prev_node, node, /*skip_draw_delays*/true);
1159+
draw_flyline_timing_edge_helper_fn(g, contour_color, ezgl::line_dash::none, /*line_width*/1, delay, prev_node, node, /*skip_draw_delays*/true);
11601160
}
11611161
} else {
11621162
VTR_ASSERT(draw_state->show_crit_path != DRAW_NO_CRIT_PATH);
11631163

1164-
if (drawCurrentElement) {
1164+
if (draw_current_element) {
11651165
//Draw the routed version of the timing edge
11661166
draw_routed_timing_edge_connection(prev_node, node, color, g);
11671167

1168-
drawFlylineTimingEdgeHelperFn(g, color, ezgl::line_dash::asymmetric_5_3, /*line_width*/3, delay, prev_node, node);
1168+
draw_flyline_timing_edge_helper_fn(g, color, ezgl::line_dash::asymmetric_5_3, /*line_width*/3, delay, prev_node, node);
11691169
} else if (draw_crit_path_contour) {
1170-
drawFlylineTimingEdgeHelperFn(g, color, ezgl::line_dash::asymmetric_5_3, /*line_width*/3, delay, prev_node, node, /*skip_draw_delays*/true);
1170+
draw_flyline_timing_edge_helper_fn(g, color, ezgl::line_dash::asymmetric_5_3, /*line_width*/3, delay, prev_node, node, /*skip_draw_delays*/true);
11711171
}
11721172
}
11731173
}
@@ -1176,7 +1176,7 @@ void draw_crit_path_elements(const std::vector<tatum::TimingPath>& paths, const
11761176
prev_arr_time = arr_time;
11771177
// end draw element
11781178

1179-
elementCounter++;
1179+
element_counter++;
11801180
}
11811181
}
11821182
}

0 commit comments

Comments
 (0)