Skip to content

Commit

Permalink
removed a clang tidy warning about implicit narrowing conversion
Browse files Browse the repository at this point in the history
warning: narrowing conversion from 'size_t' (aka 'unsigned long long') to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions]
Signed-off-by: Surajjalpun2002 <[email protected]>
  • Loading branch information
Surajjalpun2002 committed Oct 21, 2023
1 parent cda8b3c commit bc62939
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion avogadro/core/molecule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ Molecule::BondType Molecule::addBond(const AtomType& a, const AtomType& b,
size_t calcNlogN(size_t n)
{
size_t aproxLog = 1;
float aux = n;
float aux = static_cast<float>(n);
while (aux > 2.0f) {
aux /= 2.0f;
++aproxLog;
Expand Down

0 comments on commit bc62939

Please sign in to comment.