Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coding - Fixing clang-tidy warnings #45

Draft
wants to merge 1 commit into
base: IR
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@ static void FindBounds(const TColStd_Array1OfReal& Arr,
if((N!=Bound1)&&(N!=Bound2)) {
if(Abs(Der) > Tol ) {
if(Der>0) {Bound1=N;Bound2= N+1;}
else
if(Der<0){Bound1=N-1;Bound2=N;}
else {Bound1=N-1;Bound2=N;}
DerNull = Standard_False;
}
if(Abs(Der) <=Tol ) {
Expand Down Expand Up @@ -272,14 +271,14 @@ static void Locate1Coord(const Standard_Integer Index,
}
else
if(DIsNull==Standard_True){
if( Abs( Comp1-(f=BSplC->Knot(Lo))) <= Tol)
if( Abs( Comp1-(f=BSplC->Knot(Lo))) <= Tol) // NOLINT
{
if(Index==1) { LeftBot.SetX(BSplC->Knot(Lo));
RightTop.SetX(BSplC->Knot(Lo+1));}
else if(Index==2) { LeftBot.SetY(BSplC->Knot(Lo));
RightTop.SetY(BSplC->Knot(Lo+1));}
} else
if( Abs( Comp1-(l=BSplC->Knot(Up))) <= Tol)
if( Abs( Comp1-(l=BSplC->Knot(Up))) <= Tol) // NOLINT
{
if(Index==1) { LeftBot.SetX(BSplC->Knot(Up-1));
RightTop.SetX(BSplC->Knot(Up));}
Expand Down Expand Up @@ -572,7 +571,7 @@ static void Locate2Coord(const Standard_Integer Index,
if(Index==2) { LeftBot.SetY(I1);
RightTop.SetY(Comp1);}
}
else
else
if(DComp1 > 0)
{ if(Index==1) { LeftBot.SetX(Comp1);
RightTop.SetX(I2);}
Expand All @@ -585,7 +584,7 @@ static void Locate2Coord(const Standard_Integer Index,
RightTop.SetY(I2);}
}
}
else
else
if(Abs(DComp1)<=Tol) {
if(Index==1) { LeftBot.SetX(I1) ;
RightTop.SetX(I2);}
Expand Down
7 changes: 6 additions & 1 deletion src/Adaptor3d/Adaptor3d_TopolTool.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Adaptor3d_TopolTool::Adaptor3d_TopolTool ()

Adaptor3d_TopolTool::Adaptor3d_TopolTool (const Handle(Adaptor3d_Surface)& S)
{
Initialize(S);
initialize(S);
}


Expand All @@ -57,6 +57,11 @@ void Adaptor3d_TopolTool::Initialize ()
}

void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_Surface)& S)
{
initialize(S);
}

void Adaptor3d_TopolTool::initialize (const Handle(Adaptor3d_Surface)& S)
{
Standard_Real pinf,psup,deltap;
//Adaptor2d_Line2d * Line2dPtr ;
Expand Down
4 changes: 4 additions & 0 deletions src/Adaptor3d/Adaptor3d_TopolTool.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ public:

DEFINE_STANDARD_RTTIEXT(Adaptor3d_TopolTool,Standard_Transient)

protected:

void initialize (const Handle(Adaptor3d_Surface)& theS);

protected:

Handle(Adaptor3d_Surface) myS;
Expand Down
11 changes: 4 additions & 7 deletions src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5917,7 +5917,6 @@ int mma2er2_(integer *ndjacu,
integer i2rdu, i2rdv;
doublereal errnu, errnv;
integer ii, nd, jj, nu, nv;
doublereal bid0, bid1;

/* **********************************************************************
*/
Expand Down Expand Up @@ -6031,12 +6030,11 @@ int mma2er2_(integer *ndjacu,
/* ---------------- by U, the degree by V is fixed to NV -----------------
*/

bid0 = 0.;
if (nv > *mindgv) {
bid0 = xmaxjv[nv - i2rdv];
doublereal bid0 = xmaxjv[nv - i2rdv];
i__1 = *ndimen;
for (nd = 1; nd <= i__1; ++nd) {
bid1 = 0.;
doublereal bid1 = 0.;
i__2 = nu;
for (ii = i2rdu; ii <= i__2; ++ii) {
bid1 += (d__1 = patjac[ii + (nv + nd * patjac_dim2) *
Expand All @@ -6056,12 +6054,11 @@ int mma2er2_(integer *ndjacu,
/* ---------------- by V, the degree by U is fixed to NU -----------------
*/

bid0 = 0.;
if (nu > *mindgu) {
bid0 = xmaxju[nu - i2rdu];
doublereal bid0 = xmaxju[nu - i2rdu];
i__1 = *ndimen;
for (nd = 1; nd <= i__1; ++nd) {
bid1 = 0.;
doublereal bid1 = 0.;
i__2 = nv;
for (jj = i2rdv; jj <= i__2; ++jj) {
bid1 += (d__1 = patjac[nu + (jj + nd * patjac_dim2) *
Expand Down
70 changes: 27 additions & 43 deletions src/AdvApp2Var/AdvApp2Var_MathBase.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ int AdvApp2Var_MathBase::mdsptpt_(integer *ndimen,
i__1 = *ndimen;
for (i__ = 1; i__ <= i__1; ++i__) {
j=iofset + i__ - 1;
differ[j] = point2[i__] - point1[i__];
differ[j] = point2[i__] - point1[i__]; // NOLINT
}

*distan = AdvApp2Var_MathBase::mzsnorm_(ndimen, &differ[iofset]);
Expand Down Expand Up @@ -1436,7 +1436,7 @@ int AdvApp2Var_MathBase::mmaperx_(integer *ncofmx,

i__1 = *ndimen;
for (nd = 1; nd <= i__1; ++nd) {
crvnew[nd + crvnew_dim1] = crvold[nd + crvold_dim1];
crvnew[nd + crvnew_dim1] = crvold[nd + crvold_dim1]; // NOLINT
/* L100: */
}
if (*ncoeff == 1) {
Expand Down Expand Up @@ -1863,9 +1863,9 @@ int mmatvec_(integer *nligne,
i__2 = jmax;
for (j = jmin; j <= i__2; ++j) {
k = j + aux;
somme += gmatri[k] * vecin[j];
somme += gmatri[k] * vecin[j]; // NOLINT
}
vecout[i__] = somme;
vecout[i__] = somme; // NOLINT
}


Expand Down Expand Up @@ -2565,14 +2565,14 @@ int mmchole_(integer *,//mxcoef,
i__2 = ptini - 1;
for (k = ptini - aposit[(j << 1) + 1]; k <= i__2; ++k) {
/* Computing 2nd power */
d__1 = chomat[k];
d__1 = chomat[k]; // NOLINT
somme += d__1 * d__1;
}

if (amatri[ptini] - somme < 1e-32) {
if (amatri[ptini] - somme < 1e-32) { // NOLINT
goto L9101;
}
chomat[ptini] = sqrt(amatri[ptini] - somme);
chomat[ptini] = sqrt(amatri[ptini] - somme); // NOLINT

ptcou = ptini;

Expand Down Expand Up @@ -4834,7 +4834,7 @@ int AdvApp2Var_MathBase::mmfmtb1_(integer *maxsz1,
i__2 = *jsize1;
for (jj = 1; jj <= i__2; ++jj) {
jjpt = iipt + (jj - 1);
work[jjpt] = table1[ii + jj * table1_dim1];
work[jjpt] = table1[ii + jj * table1_dim1]; // NOLINT
/* L200: */
}
/* L100: */
Expand Down Expand Up @@ -5089,7 +5089,6 @@ int mmherm0_(doublereal *debfin,
/* Local variables */
doublereal amat[36] /* was [6][6] */;
integer iord[2];
doublereal prod;
integer iord1, iord2;
doublereal miden[36] /* was [6][6] */;
integer ncmat;
Expand Down Expand Up @@ -5300,7 +5299,6 @@ int mmherm0_(doublereal *debfin,


if (iord[cot - 1] > -1) {
prod = 1.;
i__1 = ncf;
for (jj = 1; jj <= i__1; ++jj) {
cof[jj - 1] = 1.;
Expand All @@ -5313,7 +5311,7 @@ int mmherm0_(doublereal *debfin,

ii = pp + iof[cot - 1];

prod = 1.;
doublereal prod = 1.;

i__2 = pp - 1;
for (jj = 1; jj <= i__2; ++jj) {
Expand Down Expand Up @@ -5804,9 +5802,9 @@ int AdvApp2Var_MathBase::mmhjcan_(integer *ndimen,
i__5 = i__ - 1;
mfact = AdvApp2Var_MathBase::pow__di(&ctenor, &i__5);
taux1[k - 1] += (tcbold[d__ + (i__ + e * tcbold_dim2) *
tcbold_dim1] * hermit[k + (i__ + 2) * 6 - 19] +
tcbold_dim1] * hermit[k + (i__ + 2) * 6 - 19] + // NOLINT
tcbold[d__ + (i__ + aux1 + e * tcbold_dim2) *
tcbold_dim1] * hermit[k + (i__ + 5) * 6 - 19]) *
tcbold_dim1] * hermit[k + (i__ + 5) * 6 - 19]) * // NOLINT
mfact;
}
}
Expand Down Expand Up @@ -6339,10 +6337,6 @@ int mmloncv_(integer *ndimax,
integer *iercod)

{
/* Initialized data */

integer kgar = 0;

/* System generated locals */
integer courbe_dim1, courbe_offset, i__1, i__2;

Expand Down Expand Up @@ -6478,14 +6472,12 @@ int mmloncv_(integer *ndimax,
/* ****** Return the coefficients for the integral (DEGRE=4*KK) */
/* if KK <> KGAR. */

if (kk != kgar) {
if (kk != 0) {
mvgaus0_(&kk, uroot, wgaus, &ngaus, iercod);
if (*iercod > 0) {
kgar = 0;
*iercod = 2;
goto L9900;
}
kgar = kk;
}

/* C1 => Point medium interval */
Expand Down Expand Up @@ -7945,15 +7937,15 @@ int mmrslss_(integer *,//mxcoef,
somme = 0.;
i__2 = i__ - 1;
for (j = i__ - sposit[(i__ << 1) + 1]; j <= i__2; ++j) {
somme += smatri[pointe - (i__ - j)] * soluti[j];
somme += smatri[pointe - (i__ - j)] * soluti[j]; // NOLINT
}

soluti[i__] = (mscnmbr[i__] - somme) / smatri[pointe];
soluti[i__] = (mscnmbr[i__] - somme) / smatri[pointe]; // NOLINT
}
/* T */
/* ----- Solution of S u = w */

for (i__ = *dimens; i__ >= 1; --i__) {
for (i__ = *dimens; i__ >= 1; --i__) { // NOLINT

pointe = sposit[(i__ << 1) + 2];
j = posuiv[pointe];
Expand Down Expand Up @@ -8752,7 +8744,7 @@ int mmtmave_(integer *nligne,
somme += gmatri[k] * vecin[j];
}
}
vecout[i__] = somme;
vecout[i__] = somme; // NOLINT
}


Expand Down Expand Up @@ -8805,7 +8797,7 @@ int mmtrpj0_(integer *ncofmx,

/* Local variables */
integer ncut, i__;
doublereal bidon, error;
doublereal bidon;
integer nd;


Expand Down Expand Up @@ -8866,8 +8858,6 @@ int mmtrpj0_(integer *ncofmx,
/* L100: */
}
*epstrc = 0.;
error = 0.;

/* Cutting of coefficients. */

ncut = 2;
Expand All @@ -8885,7 +8875,7 @@ int mmtrpj0_(integer *ncofmx,
/* L310: */
}
/* Cutting is stopped if the norm becomes too great. */
error = AdvApp2Var_MathBase::mzsnorm_(ndimen, &ycvmax[1]);
doublereal error = AdvApp2Var_MathBase::mzsnorm_(ndimen, &ycvmax[1]);
if (error > *epsi3d) {
*ncfnew = i__;
goto L9999;
Expand Down Expand Up @@ -8985,7 +8975,7 @@ int mmtrpj2_(integer *ncofmx,

/* Local variables */
integer ncut, i__;
doublereal bidon, error;
doublereal bidon;
integer ia, nd;
doublereal bid, eps1;

Expand Down Expand Up @@ -9051,8 +9041,6 @@ int mmtrpj2_(integer *ncofmx,
/* L100: */
}
*epstrc = 0.;
error = 0.;

/* Cutting of coefficients. */

ncut = ia + 1;
Expand All @@ -9069,7 +9057,7 @@ int mmtrpj2_(integer *ncofmx,
/* L310: */
}
/* One stops to cut if the norm becomes too great. */
error = AdvApp2Var_MathBase::mzsnorm_(ndimen, &ycvmax[1]);
doublereal error = AdvApp2Var_MathBase::mzsnorm_(ndimen, &ycvmax[1]);
if (error > *epsi3d) {
*ncfnew = i__;
goto L400;
Expand Down Expand Up @@ -9189,7 +9177,7 @@ int mmtrpj4_(integer *ncofmx,

/* Local variables */
integer ncut, i__;
doublereal bidon, error;
doublereal bidon;
integer ia, nd;
doublereal bid, eps1;

Expand Down Expand Up @@ -9256,8 +9244,6 @@ int mmtrpj4_(integer *ncofmx,
/* L100: */
}
*epstrc = 0.;
error = 0.;

/* Cutting of coefficients. */

ncut = ia + 1;
Expand All @@ -9274,7 +9260,7 @@ int mmtrpj4_(integer *ncofmx,
/* L310: */
}
/* Stop cutting if the norm becomes too great. */
error = AdvApp2Var_MathBase::mzsnorm_(ndimen, &ycvmax[1]);
doublereal error = AdvApp2Var_MathBase::mzsnorm_(ndimen, &ycvmax[1]);
if (error > *epsi3d) {
*ncfnew = i__;
goto L400;
Expand Down Expand Up @@ -9393,7 +9379,7 @@ int mmtrpj6_(integer *ncofmx,

/* Local variables */
integer ncut, i__;
doublereal bidon, error;
doublereal bidon;
integer ia, nd;
doublereal bid, eps1;

Expand Down Expand Up @@ -9459,8 +9445,6 @@ int mmtrpj6_(integer *ncofmx,
/* L100: */
}
*epstrc = 0.;
error = 0.;

/* Cutting of coefficients. */

ncut = ia + 1;
Expand All @@ -9477,7 +9461,7 @@ int mmtrpj6_(integer *ncofmx,
/* L310: */
}
/* Stop cutting if the norm becomes too great. */
error = AdvApp2Var_MathBase::mzsnorm_(ndimen, &ycvmax[1]);
doublereal error = AdvApp2Var_MathBase::mzsnorm_(ndimen, &ycvmax[1]);
if (error > *epsi3d) {
*ncfnew = i__;
goto L400;
Expand Down Expand Up @@ -9973,7 +9957,7 @@ int mmtrpj6_(integer *ncofmx,
goto L9101;
}
vaux2[d__ - 1] += 1;
valaux = vaux1[1] * vaux2[2] - vaux1[2] * vaux2[1];
valaux = vaux1[1] * vaux2[2] - vaux1[2] * vaux2[1]; // NOLINT
if (valaux == 0.) {
valaux = vaux1[2] * vaux2[0] - vaux1[0] * vaux2[2];
if (valaux == 0.) {
Expand Down Expand Up @@ -10443,7 +10427,7 @@ int mvcvin2_(integer *ncoeff,

/* CONSTANT TERM OF THE NEW CURVE */

cij1 = crvold[3];
cij1 = crvold[3]; // NOLINT
cij2 = crvold[4];
i__1 = *ncoeff;
for (k = 2; k <= i__1; ++k) {
Expand Down Expand Up @@ -10589,7 +10573,7 @@ int mvcvinv_(integer *ncoeff,

/* CONSTANT TERM OF THE NEW CURVE */

cij1 = crvold[4];
cij1 = crvold[4]; // NOLINT
cij2 = crvold[5];
cij3 = crvold[6];
i__1 = *ncoeff;
Expand Down
Loading