mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Fix many issues reported by clang-tidy (#7189)
* Fix many issues reported by clang-tidy We have many issues in code related to some performance to float <-> double. Clang-tidy reported it in performance-type-promotion-in-math-fn I fixed many of them. It's not ready for a promote to blocking Also fix some value which should be const-ref
This commit is contained in:
parent
e98fd934ce
commit
2481ea27ce
14 changed files with 61 additions and 52 deletions
|
@ -19,6 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
*/
|
||||
|
||||
#include "dungeongen.h"
|
||||
#include <cmath>
|
||||
#include "mapgen.h"
|
||||
#include "voxel.h"
|
||||
#include "noise.h"
|
||||
|
@ -121,7 +122,7 @@ void DungeonGen::generate(MMVManip *vm, u32 bseed, v3s16 nmin, v3s16 nmax)
|
|||
}
|
||||
|
||||
// Add them
|
||||
for (u32 i = 0; i < floor(nval_density); i++)
|
||||
for (u32 i = 0; i < std::floor(nval_density); i++)
|
||||
makeDungeon(v3s16(1, 1, 1) * MAP_BLOCKSIZE);
|
||||
|
||||
// Optionally convert some structure to alternative structure
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue