D16120: Changed old style casts

Pino Toscano noreply at phabricator.kde.org
Thu Oct 11 05:42:48 BST 2018


pino requested changes to this revision.
pino added a comment.
This revision now requires changes to proceed.


  please remove the mention of changes different than old style casts in the commit message

INLINE COMMENTS

> isotope.cpp:97
>      return m_abundance.value().toString();
> -    return QString();
>  }

this change is OK, but please create a separate commit for it

> concCalculator.cpp:291
>          return;
> -        break;
>      case 2:     // molality specified

ditto

> concCalculator.cpp:299
>          return;
> -        break;
>      case 5:     // mole fraction specified

ditto

> concCalculator.cpp:331
>          return;
> -        break;
>      case 1: // normality specified

ditto

> concCalculator.cpp:341
>          return;
> -        break;
>      }

ditto

> concCalculator.cpp:371-372
>          error(INSUFFICIENT_DATA_SOLVENT);
> -        return;
> -        break;      // cannot be calculated (insufficient data)
>      case 5:         // mole fraction specified

ditto

> concCalculator.cpp:621
>          volume = massSolute() / densitySolute();
> +        break;
>      default:

ditto

> spectrumwidget.cpp:219
>      //the total number of tickmarks to draw (small and long)
> -    const int numberOfTickmarks = (int)floor((double)(width() / d));
> +    const int numberOfTickmarks = static_cast<int>(floor(width() / d));
>  

floor() does not have a "int" variant, so forcing the type of its argument to double helps the compiler to choose the right variant

REPOSITORY
  R326 Kalzium

REVISION DETAIL
  https://phabricator.kde.org/D16120

To: carlos_hdc, pino, tcanabrava
Cc: kde-edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20181011/b5a47bdc/attachment.html>


More information about the kde-edu mailing list