aboutsummaryrefslogtreecommitdiffstats
path: root/profile-widget/diveeventitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'profile-widget/diveeventitem.cpp')
-rw-r--r--profile-widget/diveeventitem.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/profile-widget/diveeventitem.cpp b/profile-widget/diveeventitem.cpp
index 13ab3770b..64de02436 100644
--- a/profile-widget/diveeventitem.cpp
+++ b/profile-widget/diveeventitem.cpp
@@ -51,7 +51,7 @@ struct event *DiveEventItem::getEvent()
return internalEvent;
}
-void DiveEventItem::setEvent(struct event *ev, struct gasmix *lastgasmix)
+void DiveEventItem::setEvent(struct event *ev, struct gasmix lastgasmix)
{
if (!ev)
return;
@@ -63,7 +63,7 @@ void DiveEventItem::setEvent(struct event *ev, struct gasmix *lastgasmix)
recalculatePos(true);
}
-void DiveEventItem::setupPixmap(struct gasmix *lastgasmix)
+void DiveEventItem::setupPixmap(struct gasmix lastgasmix)
{
const IconMetrics& metrics = defaultIconMetrics();
#ifndef SUBSURFACE_MOBILE
@@ -92,10 +92,10 @@ void DiveEventItem::setupPixmap(struct gasmix *lastgasmix)
} else if (internalEvent->type == SAMPLE_EVENT_BOOKMARK) {
setPixmap(EVENT_PIXMAP(":dive-bookmark-icon"));
} else if (event_is_gaschange(internalEvent)) {
- struct gasmix *mix = get_gasmix_from_event(&displayed_dive, internalEvent);
+ struct gasmix mix = get_gasmix_from_event(&displayed_dive, internalEvent);
struct icd_data icd_data;
bool icd = isobaric_counterdiffusion(lastgasmix, mix, &icd_data);
- if (mix->he.permille) {
+ if (mix.he.permille) {
if (icd)
setPixmap(EVENT_PIXMAP_BIGGER(":gaschange-trimix-ICD-icon"));
else
@@ -105,7 +105,7 @@ void DiveEventItem::setupPixmap(struct gasmix *lastgasmix)
setPixmap(EVENT_PIXMAP_BIGGER(":gaschange-air-ICD-icon"));
else
setPixmap(EVENT_PIXMAP_BIGGER(":gaschange-air-icon"));
- } else if (mix->o2.permille == 1000) {
+ } else if (mix.o2.permille == 1000) {
if (icd)
setPixmap(EVENT_PIXMAP_BIGGER(":gaschange-oxygen-ICD-icon"));
else
@@ -165,7 +165,7 @@ void DiveEventItem::setupPixmap(struct gasmix *lastgasmix)
#undef EVENT_PIXMAP_BIGGER
}
-void DiveEventItem::setupToolTipString(struct gasmix *lastgasmix)
+void DiveEventItem::setupToolTipString(struct gasmix lastgasmix)
{
// we display the event on screen - so translate
QString name = gettextFromC::tr(internalEvent->name);
@@ -174,7 +174,7 @@ void DiveEventItem::setupToolTipString(struct gasmix *lastgasmix)
if (event_is_gaschange(internalEvent)) {
struct icd_data icd_data;
- struct gasmix *mix = get_gasmix_from_event(&displayed_dive, internalEvent);
+ struct gasmix mix = get_gasmix_from_event(&displayed_dive, internalEvent);
struct membuffer mb = {};
name += ": ";
name += gasname(mix);
@@ -192,7 +192,7 @@ void DiveEventItem::setupToolTipString(struct gasmix *lastgasmix)
name += QString::fromUtf8(mb.buffer, mb.len);
free_buffer(&mb);
}
- *lastgasmix = *mix;
+ lastgasmix = mix;
} else if (same_string(internalEvent->name, "modechange")) {
name += QString(": %1").arg(gettextFromC::tr(divemode_text_ui[internalEvent->value]));
} else if (value) {