Skip to content

Commit 8c9dac9

Browse files
committed
mpl: add const to method param
Signed-off-by: João Mai <[email protected]>
1 parent ad37f56 commit 8c9dac9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/mpl/src/SACoreSoftMacro.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,8 @@ void SACoreSoftMacro::fillDeadSpace()
903903
}
904904
}
905905

906-
int SACoreSoftMacro::getSegmentIndex(float segment, std::vector<float>& coords)
906+
int SACoreSoftMacro::getSegmentIndex(float segment,
907+
const std::vector<float>& coords)
907908
{
908909
int index = std::distance(
909910
coords.begin(), std::lower_bound(coords.begin(), coords.end(), segment));

src/mpl/src/SACoreSoftMacro.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class SACoreSoftMacro : public SimulatedAnnealingCore<SoftMacro>
8383
// actions used
8484
void resizeOneCluster();
8585

86-
int getSegmentIndex(float segment, std::vector<float>& coords);
86+
int getSegmentIndex(float segment, const std::vector<float>& coords);
8787

8888
void calBoundaryPenalty();
8989
float calSingleNotchPenalty(float width, float height);

0 commit comments

Comments
 (0)