Skip to content

Commit 822b092

Browse files
committed
Add tidy file to repo
1 parent cb1c3d1 commit 822b092

4 files changed

Lines changed: 20 additions & 15 deletions

File tree

.clang-tidy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Checks: '-*,modernize-avoid-bind,modernize-deprecated-headers,modernize-deprecated-ios-base-aliases,modernize-macro-to-enum,modernize-pass-by-value,modernize-raw-string-literal,modernize-redundant-void-arg,modernize-replace-auto-ptr,modernize-replace-disallow-copy-and-assign-macro,modernize-replace-random-shuffle,modernize-return-braced-init-list,modernize-shrink-to-fit,modernize-unary-static-assert,modernize-use-auto,modernize-use-bool-literals,modernize-use-default-member-init,modernize-use-emplace,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-noexcept,modernize-use-nullptr,modernize-use-override,modernize-use-transparent-functors,modernize-use-using,readability-const-return-type,readability-avoid-const-params-in-decls,readability-container-data-pointer,readability-container-size-empty,readability-delete-null-pointer,readability-duplicate-include,readability-non-const-parameter,readability-redundant-access-specifiers,readability-redundant-control-flow,readability-redundant-declaration,readability-redundant-function-ptr-dereference,readability-redundant-smartptr-get,readability-redundant-string-cstr,readability-redundant-string-init,readability-simplify-boolean-expr,readability-simplify-subscript-expr,performance-*'
2+
CheckOptions:
3+
- {key: modernize-use-override.AllowOverrideAndFinal, value: 'true'}
4+
- {key: performance-unnecessary-copy-initialization.AllowedTypes, value: 'su2double'}
5+
- {key: performance-unnecessary-value-param.AllowedTypes, value: 'su2double'}

Common/include/geometry/CGeometry.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ extern "C" {
4545
#include <sstream>
4646
#include <cmath>
4747
#include <algorithm>
48-
#include <string.h>
49-
#include <stdio.h>
50-
#include <stdlib.h>
48+
#include <cstring>
49+
#include <cstdio>
50+
#include <cstdlib>
5151
#include <climits>
5252
#include <memory>
5353
#include <unordered_map>
@@ -1678,7 +1678,7 @@ class CGeometry {
16781678
/*!
16791679
* \brief Compute and store the volume of the primal elements.
16801680
*/
1681-
void SetElemVolume() const;
1681+
void SetElemVolume();
16821682

16831683
/*!
16841684
* \brief Set the multigrid index for the current geometry object.

Common/src/grid_movement/CFreeFormDefBox.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ void CFreeFormDefBox::SetUnitCornerPoints() {
191191
delete[] coord;
192192
}
193193

194-
void CFreeFormDefBox::SetControlPoints_Parallelepiped() const {
194+
void CFreeFormDefBox::SetControlPoints_Parallelepiped() {
195195
unsigned short iDim, iDegree, jDegree, kDegree;
196196

197197
/*--- Set base control points according to the notation of Vtk for hexahedrons ---*/
@@ -265,7 +265,7 @@ void CFreeFormDefBox::SetSupportCP(CFreeFormDefBox* FFDBox) {
265265
}
266266
}
267267

268-
void CFreeFormDefBox::SetSupportCPChange(CFreeFormDefBox* FFDBox) const {
268+
void CFreeFormDefBox::SetSupportCPChange(CFreeFormDefBox* FFDBox) {
269269
unsigned short iDim, iOrder, jOrder, kOrder;
270270
su2double *CartCoordNew, *ParamCoord;
271271
unsigned short lOrder = FFDBox->GetlOrder();
@@ -310,7 +310,7 @@ void CFreeFormDefBox::SetSupportCPChange(CFreeFormDefBox* FFDBox) const {
310310
}
311311
}
312312

313-
void CFreeFormDefBox::SetCart2Cyl_ControlPoints(CConfig* config) const {
313+
void CFreeFormDefBox::SetCart2Cyl_ControlPoints(CConfig* config) {
314314
unsigned short iDegree, jDegree, kDegree;
315315
su2double CartCoord[3];
316316
su2double X_0, Y_0, Z_0, Xbar, Ybar, Zbar;
@@ -354,7 +354,7 @@ void CFreeFormDefBox::SetCart2Cyl_ControlPoints(CConfig* config) const {
354354
}
355355
}
356356

357-
void CFreeFormDefBox::SetCyl2Cart_ControlPoints(CConfig* config) const {
357+
void CFreeFormDefBox::SetCyl2Cart_ControlPoints(CConfig* config) {
358358
unsigned short iDegree, jDegree, kDegree;
359359
su2double PolarCoord[3];
360360

@@ -386,7 +386,7 @@ void CFreeFormDefBox::SetCyl2Cart_ControlPoints(CConfig* config) const {
386386
}
387387
}
388388

389-
void CFreeFormDefBox::SetCart2Cyl_CornerPoints(CConfig* config) const {
389+
void CFreeFormDefBox::SetCart2Cyl_CornerPoints(CConfig* config) {
390390
unsigned short iCornerPoint;
391391
su2double* CartCoord;
392392
su2double X_0, Y_0, Z_0, Xbar, Ybar, Zbar;
@@ -408,7 +408,7 @@ void CFreeFormDefBox::SetCart2Cyl_CornerPoints(CConfig* config) const {
408408
}
409409
}
410410

411-
void CFreeFormDefBox::SetCyl2Cart_CornerPoints(CConfig* config) const {
411+
void CFreeFormDefBox::SetCyl2Cart_CornerPoints(CConfig* config) {
412412
unsigned short iCornerPoint;
413413
su2double* PolarCoord;
414414
su2double X_0, Y_0, Z_0, Xbar, Ybar, Zbar;
@@ -430,7 +430,7 @@ void CFreeFormDefBox::SetCyl2Cart_CornerPoints(CConfig* config) const {
430430
}
431431
}
432432

433-
void CFreeFormDefBox::SetCart2Sphe_ControlPoints(CConfig* config) const {
433+
void CFreeFormDefBox::SetCart2Sphe_ControlPoints(CConfig* config) {
434434
unsigned short iDegree, jDegree, kDegree;
435435
su2double CartCoord[3];
436436
su2double X_0, Y_0, Z_0, Xbar, Ybar, Zbar;
@@ -476,7 +476,7 @@ void CFreeFormDefBox::SetCart2Sphe_ControlPoints(CConfig* config) const {
476476
}
477477
}
478478

479-
void CFreeFormDefBox::SetSphe2Cart_ControlPoints(CConfig* config) const {
479+
void CFreeFormDefBox::SetSphe2Cart_ControlPoints(CConfig* config) {
480480
unsigned short iDegree, jDegree, kDegree;
481481
su2double PolarCoord[3];
482482

@@ -508,7 +508,7 @@ void CFreeFormDefBox::SetSphe2Cart_ControlPoints(CConfig* config) const {
508508
}
509509
}
510510

511-
void CFreeFormDefBox::SetCart2Sphe_CornerPoints(CConfig* config) const {
511+
void CFreeFormDefBox::SetCart2Sphe_CornerPoints(CConfig* config) {
512512
unsigned short iCornerPoint;
513513
su2double* CartCoord;
514514
su2double X_0, Y_0, Z_0, Xbar, Ybar, Zbar;
@@ -530,7 +530,7 @@ void CFreeFormDefBox::SetCart2Sphe_CornerPoints(CConfig* config) const {
530530
}
531531
}
532532

533-
void CFreeFormDefBox::SetSphe2Cart_CornerPoints(CConfig* config) const {
533+
void CFreeFormDefBox::SetSphe2Cart_CornerPoints(CConfig* config) {
534534
unsigned short iCornerPoint;
535535
su2double* PolarCoord;
536536
su2double X_0, Y_0, Z_0, Xbar, Ybar, Zbar;

SU2_CFD/src/numerics/CNumerics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1603,7 +1603,7 @@ void CNumerics::GetPrimitive2Conservative (const su2double *val_Mean_PrimVar,
16031603
}
16041604
}
16051605

1606-
void CNumerics::CreateBasis(const su2double *val_Normal, su2double* l, su2double* m) const {
1606+
void CNumerics::CreateBasis(const su2double *val_Normal, su2double* l, su2double* m) {
16071607

16081608
unsigned short iDim;
16091609
su2double modm, modl;

0 commit comments

Comments
 (0)