Skip to content

Commit b9b33d8

Browse files
committed
use elementCounter for element color instead of i
1 parent a1f08c4 commit b9b33d8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

vpr/src/draw/draw_basic.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,6 @@ void draw_crit_path_elements(const std::vector<tatum::TimingPath>& paths, const
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 i = 0;
11381137
int elementCounter = 0;
11391138
for (const tatum::TimingPathElem& elem : path.data_arrival_path().elements()) {
11401139
bool drawCurrentElement = elementIndexes.empty() ? true : elementIndexes.find(elementCounter) != elementIndexes.end();
@@ -1147,8 +1146,7 @@ void draw_crit_path_elements(const std::vector<tatum::TimingPath>& paths, const
11471146
//any routing which corresponds to the edge
11481147
//
11491148
//We pick colors from the kelly max-contrast list, for long paths there may be repeats
1150-
ezgl::color color = kelly_max_contrast_colors[i++
1151-
% kelly_max_contrast_colors.size()];
1149+
ezgl::color color = kelly_max_contrast_colors[elementCounter % kelly_max_contrast_colors.size()];
11521150

11531151
if (prev_node) {
11541152
float delay = arr_time - prev_arr_time;

0 commit comments

Comments
 (0)