mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: remove TankItem::plotEndTime member variable
That variable was only used in a single function and always reset at the beginning of the function. No point in being a member variable. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
118700fd18
commit
d97cc8d4d5
2 changed files with 2 additions and 6 deletions
|
@ -12,7 +12,6 @@ static const double border = 1.0;
|
||||||
|
|
||||||
TankItem::TankItem(const DiveCartesianAxis &axis, double dpr) :
|
TankItem::TankItem(const DiveCartesianAxis &axis, double dpr) :
|
||||||
hAxis(axis),
|
hAxis(axis),
|
||||||
plotEndTime(-1),
|
|
||||||
dpr(dpr)
|
dpr(dpr)
|
||||||
{
|
{
|
||||||
QColor red(PERSIANRED1);
|
QColor red(PERSIANRED1);
|
||||||
|
@ -71,14 +70,12 @@ void TankItem::setData(const struct plot_info *plotInfo, const struct dive *d)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// If there is nothing to plot, quit early.
|
// If there is nothing to plot, quit early.
|
||||||
if (plotInfo->nr <= 0) {
|
if (plotInfo->nr <= 0)
|
||||||
plotEndTime = -1;
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
// Find correct end of the dive plot for correct end of the tankbar.
|
// Find correct end of the dive plot for correct end of the tankbar.
|
||||||
const struct plot_data *last_entry = &plotInfo->entry[plotInfo->nr - 1];
|
const struct plot_data *last_entry = &plotInfo->entry[plotInfo->nr - 1];
|
||||||
plotEndTime = last_entry->sec;
|
int plotEndTime = last_entry->sec;
|
||||||
|
|
||||||
// We don't have enougth data to calculate things, quit.
|
// We don't have enougth data to calculate things, quit.
|
||||||
if (plotEndTime < 0)
|
if (plotEndTime < 0)
|
||||||
|
|
|
@ -20,7 +20,6 @@ public:
|
||||||
private:
|
private:
|
||||||
void createBar(int startTime, int stopTime, struct gasmix gas);
|
void createBar(int startTime, int stopTime, struct gasmix gas);
|
||||||
const DiveCartesianAxis &hAxis;
|
const DiveCartesianAxis &hAxis;
|
||||||
int plotEndTime;
|
|
||||||
double dpr;
|
double dpr;
|
||||||
QBrush air, nitrox, oxygen, trimix;
|
QBrush air, nitrox, oxygen, trimix;
|
||||||
QList<QGraphicsRectItem *> rects;
|
QList<QGraphicsRectItem *> rects;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue