mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
The profile was using a Qt-model to access its data. This means routing everything through Qt's QVariants and lead to verbose code such as double prev_y = dataModel.index(i-1, vDataColumn).data().toReal(); Instead of storing a data-column and do access via a template, simply store accessor functions. The code from above now reads as double prev_y = accessor(data[i-1]); This should also be distinctly faster for the ns-optimizers among us. Only one case was somewhat nasty to convert: The accessors for the 16 tissues are now generated via a recursive template. Thanks to C++17's constexpr if, such a template is pleasantly easy to follow, though. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> |
||
---|---|---|
.. | ||
animationfunctions.cpp | ||
animationfunctions.h | ||
CMakeLists.txt | ||
divecartesianaxis.cpp | ||
divecartesianaxis.h | ||
diveeventitem.cpp | ||
diveeventitem.h | ||
divehandler.cpp | ||
divehandler.h | ||
divelineitem.cpp | ||
divelineitem.h | ||
divepercentageitem.cpp | ||
divepercentageitem.h | ||
divepixmapcache.cpp | ||
divepixmapcache.h | ||
divepixmapitem.cpp | ||
divepixmapitem.h | ||
diveprofileitem.cpp | ||
diveprofileitem.h | ||
diverectitem.cpp | ||
diverectitem.h | ||
divetextitem.cpp | ||
divetextitem.h | ||
divetooltipitem.cpp | ||
divetooltipitem.h | ||
profilescene.cpp | ||
profilescene.h | ||
profilewidget2.cpp | ||
profilewidget2.h | ||
qmlprofile.cpp | ||
qmlprofile.h | ||
ruleritem.cpp | ||
ruleritem.h | ||
tankitem.cpp | ||
tankitem.h |