@@ -168,8 +168,8 @@ GridGraph::GridGraph(const Design* design, const Constants& constants)
168168 IntervalT<int > edgeInterval (grid_centers_[direction][edge_index],
169169 grid_centers_[direction][edge_index + 1 ]);
170170 // Update cpacity
171- std::vector<IntervalT<int >> usableIntervals (gridTrackRange.range () + 1 ,
172- edgeInterval);
171+ std::vector<IntervalT<int >> usable_intervals (gridTrackRange.range () + 1 ,
172+ edgeInterval);
173173 for (auto & obstacle : obstaclesAtEdge[edge_index]) {
174174 IntervalT<int > affectedTrackRange
175175 = gridTrackRange.IntersectWith (obstacle->second );
@@ -183,20 +183,20 @@ GridGraph::GridGraph(const Design* design, const Constants& constants)
183183 if (obstacle->first [direction].low <= gridline
184184 && obstacle->first [direction].high >= gridline) {
185185 // Completely blocked
186- usableIntervals [tIdx] = {gridline, gridline};
186+ usable_intervals [tIdx] = {gridline, gridline};
187187 } else if (obstacle->first [direction].high < gridline) {
188- usableIntervals [tIdx].low = std::max (
189- usableIntervals [tIdx].low , obstacle->first [direction].high );
188+ usable_intervals [tIdx].low = std::max (
189+ usable_intervals [tIdx].low , obstacle->first [direction].high );
190190 } else if (obstacle->first [direction].low > gridline) {
191- usableIntervals [tIdx].high = std::min (
192- usableIntervals [tIdx].high , obstacle->first [direction].low );
191+ usable_intervals [tIdx].high = std::min (
192+ usable_intervals [tIdx].high , obstacle->first [direction].low );
193193 }
194194 }
195195 }
196196 CapacityT capacity = 0 ;
197- for (int tIdx = 0 ; tIdx < usableIntervals. size (); tIdx++ ) {
198- capacity += (CapacityT) usableIntervals[tIdx]. range ()
199- / edgeInterval.range ();
197+ for (IntervalT< int >& usable_interval : usable_intervals ) {
198+ capacity
199+ += (CapacityT) usable_interval. range () / edgeInterval.range ();
200200 }
201201 if (direction == MetalLayer::V) {
202202 graph_edges_[layer_index][gridIndex][edge_index].capacity = capacity;
@@ -736,7 +736,7 @@ void GridGraph::updateWireCostView(
736736 });
737737}
738738
739- void GridGraph::write (const std::string heatmap_file) const
739+ void GridGraph::write (const std::string& heatmap_file) const
740740{
741741 printf (" writing heatmap to file..." );
742742 std::stringstream ss;
0 commit comments