Skip to content

Commit 7d48fbf

Browse files
committed
fix readability-non-const-parameter (supress 1 false)
Signed-off-by: Matt Liberty <[email protected]>
1 parent 23a4c32 commit 7d48fbf

File tree

19 files changed

+157
-179
lines changed

19 files changed

+157
-179
lines changed

src/drt/src/pa/FlexPA.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ class FlexPA
845845
bool genPatternsGC(
846846
const std::set<frBlockObject*>& target_objs,
847847
const std::vector<std::pair<frConnFig*, frBlockObject*>>& objs,
848-
PatternType pattern_type,
848+
const PatternType pattern_type,
849849
std::set<frBlockObject*>* owners = nullptr);
850850

851851
/**

src/drt/src/pa/FlexPA_acc_pattern.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ bool FlexPA::genPatternsGC(
321321
const std::set<frBlockObject*>& target_objs,
322322
const std::vector<std::pair<frConnFig*, frBlockObject*>>& objs,
323323
const PatternType pattern_type,
324+
// NOLINTNEXTLINE(readability-non-const-parameter)
324325
std::set<frBlockObject*>* owners)
325326
{
326327
if (objs.empty()) {

src/gpl/src/fftsg.cpp

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ void rdft(int n, int isgn, float* a, int* ip, float* w)
313313
void makect(int nc, int* ip, float* c);
314314
void cftfsub(int n, float* a, int* ip, int nw, float* w);
315315
void cftbsub(int n, float* a, int* ip, int nw, float* w);
316-
void rftfsub(int n, float* a, int nc, float* c);
317-
void rftbsub(int n, float* a, int nc, float* c);
316+
void rftfsub(int n, float* a, int nc, const float* c);
317+
void rftbsub(int n, float* a, int nc, const float* c);
318318
int nw, nc;
319319
float xi;
320320

@@ -356,9 +356,9 @@ void ddct(int n, int isgn, float* a, int* ip, float* w)
356356
void makect(int nc, int* ip, float* c);
357357
void cftfsub(int n, float* a, int* ip, int nw, float* w);
358358
void cftbsub(int n, float* a, int* ip, int nw, float* w);
359-
void rftfsub(int n, float* a, int nc, float* c);
360-
void rftbsub(int n, float* a, int nc, float* c);
361-
void dctsub(int n, float* a, int nc, float* c);
359+
void rftfsub(int n, float* a, int nc, const float* c);
360+
void rftbsub(int n, float* a, int nc, const float* c);
361+
void dctsub(int n, float* a, int nc, const float* c);
362362
int j, nw, nc;
363363
float xr;
364364

@@ -412,9 +412,9 @@ void ddst(int n, int isgn, float* a, int* ip, float* w)
412412
void makect(int nc, int* ip, float* c);
413413
void cftfsub(int n, float* a, int* ip, int nw, float* w);
414414
void cftbsub(int n, float* a, int* ip, int nw, float* w);
415-
void rftfsub(int n, float* a, int nc, float* c);
416-
void rftbsub(int n, float* a, int nc, float* c);
417-
void dstsub(int n, float* a, int nc, float* c);
415+
void rftfsub(int n, float* a, int nc, const float* c);
416+
void rftbsub(int n, float* a, int nc, const float* c);
417+
void dstsub(int n, float* a, int nc, const float* c);
418418
int j, nw, nc;
419419
float xr;
420420

@@ -466,8 +466,8 @@ void dfct(int n, float* a, float* t, int* ip, float* w)
466466
void makewt(int nw, int* ip, float* w);
467467
void makect(int nc, int* ip, float* c);
468468
void cftfsub(int n, float* a, int* ip, int nw, float* w);
469-
void rftfsub(int n, float* a, int nc, float* c);
470-
void dctsub(int n, float* a, int nc, float* c);
469+
void rftfsub(int n, float* a, int nc, const float* c);
470+
void dctsub(int n, float* a, int nc, const float* c);
471471
int j, k, l, m, mh, nw, nc;
472472
float xr, xi, yr, yi;
473473

@@ -558,8 +558,8 @@ void dfst(int n, float* a, float* t, int* ip, float* w)
558558
void makewt(int nw, int* ip, float* w);
559559
void makect(int nc, int* ip, float* c);
560560
void cftfsub(int n, float* a, int* ip, int nw, float* w);
561-
void rftfsub(int n, float* a, int nc, float* c);
562-
void dstsub(int n, float* a, int nc, float* c);
561+
void rftfsub(int n, float* a, int nc, const float* c);
562+
void dstsub(int n, float* a, int nc, const float* c);
563563
int j, k, l, m, mh, nw, nc;
564564
float xr, xi, yr, yi;
565565

@@ -798,15 +798,15 @@ void makect(int nc, int* ip, float* c)
798798

799799
void cftfsub(int n, float* a, int* ip, int nw, float* w)
800800
{
801-
void bitrv2(int n, int* ip, float* a);
801+
void bitrv2(int n, const int* ip, float* a);
802802
void bitrv216(float* a);
803803
void bitrv208(float* a);
804-
void cftf1st(int n, float* a, float* w);
804+
void cftf1st(int n, float* a, const float* w);
805805
void cftrec4(int n, float* a, int nw, float* w);
806806
void cftleaf(int n, int isplt, float* a, int nw, float* w);
807807
void cftfx41(int n, float* a, int nw, float* w);
808-
void cftf161(float* a, float* w);
809-
void cftf081(float* a, float* w);
808+
void cftf161(float* a, const float* w);
809+
void cftf081(float* a, const float* w);
810810
void cftf040(float* a);
811811
void cftx020(float* a);
812812
#ifdef USE_CDFT_THREADS
@@ -845,15 +845,15 @@ void cftfsub(int n, float* a, int* ip, int nw, float* w)
845845

846846
void cftbsub(int n, float* a, int* ip, int nw, float* w)
847847
{
848-
void bitrv2conj(int n, int* ip, float* a);
848+
void bitrv2conj(int n, const int* ip, float* a);
849849
void bitrv216neg(float* a);
850850
void bitrv208neg(float* a);
851-
void cftb1st(int n, float* a, float* w);
851+
void cftb1st(int n, float* a, const float* w);
852852
void cftrec4(int n, float* a, int nw, float* w);
853853
void cftleaf(int n, int isplt, float* a, int nw, float* w);
854854
void cftfx41(int n, float* a, int nw, float* w);
855-
void cftf161(float* a, float* w);
856-
void cftf081(float* a, float* w);
855+
void cftf161(float* a, const float* w);
856+
void cftf081(float* a, const float* w);
857857
void cftb040(float* a);
858858
void cftx020(float* a);
859859
#ifdef USE_CDFT_THREADS
@@ -890,7 +890,7 @@ void cftbsub(int n, float* a, int* ip, int nw, float* w)
890890
}
891891
}
892892

893-
void bitrv2(int n, int* ip, float* a)
893+
void bitrv2(int n, const int* ip, float* a)
894894
{
895895
int j, j1, k, k1, l, m, nh, nm;
896896
float xr, xi, yr, yi;
@@ -1236,7 +1236,7 @@ void bitrv2(int n, int* ip, float* a)
12361236
}
12371237
}
12381238

1239-
void bitrv2conj(int n, int* ip, float* a)
1239+
void bitrv2conj(int n, const int* ip, float* a)
12401240
{
12411241
int j, j1, k, k1, l, m, nh, nm;
12421242
float xr, xi, yr, yi;
@@ -1769,7 +1769,7 @@ void bitrv208neg(float* a)
17691769
a[15] = x4i;
17701770
}
17711771

1772-
void cftf1st(int n, float* a, float* w)
1772+
void cftf1st(int n, float* a, const float* w)
17731773
{
17741774
int j, j0, j1, j2, j3, k, m, mh;
17751775
float wn4r, csc1, csc3, wk1r, wk1i, wk3r, wk3i, wd1r, wd1i, wd3r, wd3i;
@@ -1973,7 +1973,7 @@ void cftf1st(int n, float* a, float* w)
19731973
a[j3 + 3] = wk3i * x0i - wk3r * x0r;
19741974
}
19751975

1976-
void cftb1st(int n, float* a, float* w)
1976+
void cftb1st(int n, float* a, const float* w)
19771977
{
19781978
int j, j0, j1, j2, j3, k, m, mh;
19791979
float wn4r, csc1, csc3, wk1r, wk1i, wk3r, wk3i, wd1r, wd1i, wd3r, wd3i;
@@ -2225,7 +2225,7 @@ void* cftrec1_th(void* p)
22252225
{
22262226
int cfttree(int n, int j, int k, float* a, int nw, float* w);
22272227
void cftleaf(int n, int isplt, float* a, int nw, float* w);
2228-
void cftmdl1(int n, float* a, float* w);
2228+
void cftmdl1(int n, float* a, const float* w);
22292229
int isplt, j, k, m, n, n0, nw;
22302230
float *a, *w;
22312231

@@ -2253,7 +2253,7 @@ void* cftrec2_th(void* p)
22532253
{
22542254
int cfttree(int n, int j, int k, float* a, int nw, float* w);
22552255
void cftleaf(int n, int isplt, float* a, int nw, float* w);
2256-
void cftmdl2(int n, float* a, float* w);
2256+
void cftmdl2(int n, float* a, const float* w);
22572257
int isplt, j, k, m, n, n0, nw;
22582258
float *a, *w;
22592259

@@ -2284,7 +2284,7 @@ void cftrec4(int n, float* a, int nw, float* w)
22842284
{
22852285
int cfttree(int n, int j, int k, float* a, int nw, float* w);
22862286
void cftleaf(int n, int isplt, float* a, int nw, float* w);
2287-
void cftmdl1(int n, float* a, float* w);
2287+
void cftmdl1(int n, float* a, const float* w);
22882288
int isplt, j, k, m;
22892289

22902290
m = n;
@@ -2303,8 +2303,8 @@ void cftrec4(int n, float* a, int nw, float* w)
23032303

23042304
int cfttree(int n, int j, int k, float* a, int nw, float* w)
23052305
{
2306-
void cftmdl1(int n, float* a, float* w);
2307-
void cftmdl2(int n, float* a, float* w);
2306+
void cftmdl1(int n, float* a, const float* w);
2307+
void cftmdl2(int n, float* a, const float* w);
23082308
int i, isplt, m;
23092309

23102310
if ((k & 3) != 0) {
@@ -2337,12 +2337,12 @@ int cfttree(int n, int j, int k, float* a, int nw, float* w)
23372337

23382338
void cftleaf(int n, int isplt, float* a, int nw, float* w)
23392339
{
2340-
void cftmdl1(int n, float* a, float* w);
2341-
void cftmdl2(int n, float* a, float* w);
2342-
void cftf161(float* a, float* w);
2343-
void cftf162(float* a, float* w);
2344-
void cftf081(float* a, float* w);
2345-
void cftf082(float* a, float* w);
2340+
void cftmdl1(int n, float* a, const float* w);
2341+
void cftmdl2(int n, float* a, const float* w);
2342+
void cftf161(float* a, const float* w);
2343+
void cftf162(float* a, const float* w);
2344+
void cftf081(float* a, const float* w);
2345+
void cftf082(float* a, const float* w);
23462346

23472347
if (n == 512) {
23482348
cftmdl1(128, a, &w[nw - 64]);
@@ -2399,7 +2399,7 @@ void cftleaf(int n, int isplt, float* a, int nw, float* w)
23992399
}
24002400
}
24012401

2402-
void cftmdl1(int n, float* a, float* w)
2402+
void cftmdl1(int n, float* a, const float* w)
24032403
{
24042404
int j, j0, j1, j2, j3, k, m, mh;
24052405
float wn4r, wk1r, wk1i, wk3r, wk3i;
@@ -2508,7 +2508,7 @@ void cftmdl1(int n, float* a, float* w)
25082508
a[j3 + 1] = -wn4r * (x0i - x0r);
25092509
}
25102510

2511-
void cftmdl2(int n, float* a, float* w)
2511+
void cftmdl2(int n, float* a, const float* w)
25122512
{
25132513
int j, j0, j1, j2, j3, k, kr, m, mh;
25142514
float wn4r, wk1r, wk1i, wk3r, wk3i, wd1r, wd1i, wd3r, wd3i;
@@ -2643,10 +2643,10 @@ void cftmdl2(int n, float* a, float* w)
26432643

26442644
void cftfx41(int n, float* a, int nw, float* w)
26452645
{
2646-
void cftf161(float* a, float* w);
2647-
void cftf162(float* a, float* w);
2648-
void cftf081(float* a, float* w);
2649-
void cftf082(float* a, float* w);
2646+
void cftf161(float* a, const float* w);
2647+
void cftf162(float* a, const float* w);
2648+
void cftf081(float* a, const float* w);
2649+
void cftf082(float* a, const float* w);
26502650

26512651
if (n == 128) {
26522652
cftf161(a, &w[nw - 8]);
@@ -2661,7 +2661,7 @@ void cftfx41(int n, float* a, int nw, float* w)
26612661
}
26622662
}
26632663

2664-
void cftf161(float* a, float* w)
2664+
void cftf161(float* a, const float* w)
26652665
{
26662666
float wn4r, wk1r, wk1i, x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i, y0r, y0i, y1r,
26672667
y1i, y2r, y2i, y3r, y3i, y4r, y4i, y5r, y5i, y6r, y6i, y7r, y7i, y8r, y8i,
@@ -2817,7 +2817,7 @@ void cftf161(float* a, float* w)
28172817
a[7] = x1i - x3r;
28182818
}
28192819

2820-
void cftf162(float* a, float* w)
2820+
void cftf162(float* a, const float* w)
28212821
{
28222822
float wn4r, wk1r, wk1i, wk2r, wk2i, wk3r, wk3i, x0r, x0i, x1r, x1i, x2r, x2i,
28232823
y0r, y0i, y1r, y1i, y2r, y2i, y3r, y3i, y4r, y4i, y5r, y5i, y6r, y6i, y7r,
@@ -2997,7 +2997,7 @@ void cftf162(float* a, float* w)
29972997
a[31] = x1i - x2r;
29982998
}
29992999

3000-
void cftf081(float* a, float* w)
3000+
void cftf081(float* a, const float* w)
30013001
{
30023002
float wn4r, x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i, y0r, y0i, y1r, y1i, y2r,
30033003
y2i, y3r, y3i, y4r, y4i, y5r, y5i, y6r, y6i, y7r, y7i;
@@ -3057,7 +3057,7 @@ void cftf081(float* a, float* w)
30573057
a[7] = y2i - y6r;
30583058
}
30593059

3060-
void cftf082(float* a, float* w)
3060+
void cftf082(float* a, const float* w)
30613061
{
30623062
float wn4r, wk1r, wk1i, x0r, x0i, x1r, x1i, y0r, y0i, y1r, y1i, y2r, y2i, y3r,
30633063
y3i, y4r, y4i, y5r, y5i, y6r, y6i, y7r, y7i;
@@ -3183,7 +3183,7 @@ void cftx020(float* a)
31833183
a[3] = x0i;
31843184
}
31853185

3186-
void rftfsub(int n, float* a, int nc, float* c)
3186+
void rftfsub(int n, float* a, int nc, const float* c)
31873187
{
31883188
int j, k, kk, ks, m;
31893189
float wkr, wki, xr, xi, yr, yi;
@@ -3207,7 +3207,7 @@ void rftfsub(int n, float* a, int nc, float* c)
32073207
}
32083208
}
32093209

3210-
void rftbsub(int n, float* a, int nc, float* c)
3210+
void rftbsub(int n, float* a, int nc, const float* c)
32113211
{
32123212
int j, k, kk, ks, m;
32133213
float wkr, wki, xr, xi, yr, yi;
@@ -3231,7 +3231,7 @@ void rftbsub(int n, float* a, int nc, float* c)
32313231
}
32323232
}
32333233

3234-
void dctsub(int n, float* a, int nc, float* c)
3234+
void dctsub(int n, float* a, int nc, const float* c)
32353235
{
32363236
int j, k, kk, ks, m;
32373237
float wkr, wki, xr;
@@ -3251,7 +3251,7 @@ void dctsub(int n, float* a, int nc, float* c)
32513251
a[m] *= c[0];
32523252
}
32533253

3254-
void dstsub(int n, float* a, int nc, float* c)
3254+
void dstsub(int n, float* a, int nc, const float* c)
32553255
{
32563256
int j, k, kk, ks, m;
32573257
float wkr, wki, xr;

src/odb/src/def/def/defrReader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,7 @@ void defrSetViaWarnings(int warn)
19361936
defContext.settings->ViaWarnings = warn;
19371937
}
19381938

1939-
void defrDisableParserMsgs(int nMsg, int* msgs)
1939+
void defrDisableParserMsgs(int nMsg, const int* msgs)
19401940
{
19411941
DEF_INIT;
19421942
int i, j;
@@ -1974,7 +1974,7 @@ void defrDisableParserMsgs(int nMsg, int* msgs)
19741974
}
19751975
}
19761976

1977-
void defrEnableParserMsgs(int nMsg, int* msgs)
1977+
void defrEnableParserMsgs(int nMsg, const int* msgs)
19781978
{
19791979
DEF_INIT;
19801980
int i, j;

src/odb/src/def/defdiff/diffDefRW.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ int netf(defrCallbackType_e c, defiNet* net, defiUserData ud)
778778
}
779779

780780
// Special Net
781-
int snetf(defrCallbackType_e c, defiNet* net, defiUserData ud)
781+
int snetf(defrCallbackType_e c, const defiNet* net, defiUserData ud)
782782
{
783783
// For net and special net.
784784
int i, j, x, y, z;
@@ -1211,7 +1211,7 @@ int snetf(defrCallbackType_e c, defiNet* net, defiUserData ud)
12111211
return 0;
12121212
}
12131213

1214-
int ndr(defrCallbackType_e c, defiNonDefault* nd, defiUserData ud)
1214+
int ndr(defrCallbackType_e c, const defiNonDefault* nd, defiUserData ud)
12151215
{
12161216
// For nondefaultrule
12171217
int i;
@@ -1295,7 +1295,7 @@ char* address(const char* in)
12951295
}
12961296

12971297
// Assertion or Constraints
1298-
void operand(defrCallbackType_e c, defiAssertion* a, int ind)
1298+
void operand(defrCallbackType_e c, const defiAssertion* a, int ind)
12991299
{
13001300
int i, first = 1;
13011301
char* netName;
@@ -1343,7 +1343,7 @@ void operand(defrCallbackType_e c, defiAssertion* a, int ind)
13431343
}
13441344

13451345
// Assertion or Constraints
1346-
int constraint(defrCallbackType_e c, defiAssertion* a, defiUserData ud)
1346+
int constraint(defrCallbackType_e c, const defiAssertion* a, defiUserData ud)
13471347
{
13481348
// Handles both constraints and assertions
13491349

@@ -1382,7 +1382,7 @@ int constraint(defrCallbackType_e c, defiAssertion* a, defiUserData ud)
13821382
}
13831383

13841384
// Property definitions
1385-
int prop(defrCallbackType_e c, defiProp* p, defiUserData ud)
1385+
int prop(defrCallbackType_e c, const defiProp* p, defiUserData ud)
13861386
{
13871387
checkType(c);
13881388
if (ud != userData) {

0 commit comments

Comments
 (0)