Base/App: fix warnings from code analysers:

* convert old-style-casts to explicit C++ casts where possible
* make some implicit conversions explicit
This commit is contained in:
wmayer
2022-03-06 23:49:30 +01:00
parent 26ece78df4
commit 4a343ab31e
30 changed files with 211 additions and 155 deletions

View File

@@ -515,7 +515,7 @@ Rotation Rotation::makeRotationByAxes(Vector3d xdir, Vector3d ydir, Vector3d zdi
auto dropPriority = [&order](int index){
char tmp;
int tmp;
if (index == 0){
tmp = order[0];
order[0] = order[1];
@@ -531,7 +531,7 @@ Rotation Rotation::makeRotationByAxes(Vector3d xdir, Vector3d ydir, Vector3d zdi
//pick up the strict direction
Vector3d mainDir;
for (int i = 0; i < 3; ++i){
mainDir = *(dirs[order[0]]);
mainDir = *(dirs[size_t(order[0])]);
if (mainDir.Length() > tol)
break;
else
@@ -544,7 +544,7 @@ Rotation Rotation::makeRotationByAxes(Vector3d xdir, Vector3d ydir, Vector3d zdi
//pick up the 2nd priority direction, "hint" direction.
Vector3d hintDir;
for (int i = 0; i < 2; ++i){
hintDir = *(dirs[order[1]]);
hintDir = *(dirs[size_t(order[1])]);
if ((hintDir.Cross(mainDir)).Length() > tol)
break;
else