diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-08-07 22:28:31 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-08-08 15:22:09 -0700 |
commit | 2a966ac2a9a807f4ae45d671cca8b245f8f70ece (patch) | |
tree | 05e049de89fb104420b9d5f2057bb85eb6910de4 /profile-widget/profilewidget2.cpp | |
parent | 78f425de68cdb1504e477519577d22efd694fec0 (diff) | |
download | subsurface-2a966ac2a9a807f4ae45d671cca8b245f8f70ece.tar.gz |
Cleanup: replace macro by inline function in gas-model.c
Replace a macro calculating a degree-three polynomial by an
inline function.
Moreover, calculate the powers 1, 2 and 3 of the pressure inside
the function. The compiler will be smart enough to optimize this
to the same code. The only important thing is to write "x*x*x*coeff"
instead of "coeff*x*x*x". The compiler can't optimize the latter
because ... wonderful floating point semantics.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/profilewidget2.cpp')
0 files changed, 0 insertions, 0 deletions