summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/btdiscovery.cpp4
-rw-r--r--core/dive.c2
-rw-r--r--core/exif.cpp2
-rw-r--r--core/git-access.c2
-rw-r--r--core/libdivecomputer.c2
-rw-r--r--core/linux.c2
-rw-r--r--core/macos.c2
-rw-r--r--core/parse.c4
-rw-r--r--core/profile.c2
-rw-r--r--core/qthelper.cpp10
-rw-r--r--core/subsurface-qt/DiveObjectHelper.cpp2
-rw-r--r--core/subsurface-qt/SettingsObjectWrapper.cpp2
-rw-r--r--core/windows.c2
-rw-r--r--desktop-widgets/divelogimportdialog.cpp2
-rw-r--r--profile-widget/profilewidget2.cpp8
-rw-r--r--qt-models/divelocationmodel.cpp4
-rw-r--r--qt-models/diveplannermodel.cpp2
-rw-r--r--qt-models/filtermodels.cpp2
-rw-r--r--smtk-import/smartrak.c2
-rw-r--r--theme/list_lib.js2
20 files changed, 30 insertions, 30 deletions
diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp
index 394a90757..b3aab4fb4 100644
--- a/core/btdiscovery.cpp
+++ b/core/btdiscovery.cpp
@@ -47,9 +47,9 @@ static dc_descriptor_t *getDeviceType(QString btName)
}
if (!vendor.isEmpty() && !product.isEmpty())
- return(descriptorLookup.value(vendor + product));
+ return descriptorLookup.value(vendor + product);
- return(NULL);
+ return NULL;
}
BTDiscovery::BTDiscovery(QObject *parent) : m_btValid(false),
diff --git a/core/dive.c b/core/dive.c
index b405d7402..f3d5981c9 100644
--- a/core/dive.c
+++ b/core/dive.c
@@ -2720,7 +2720,7 @@ static int likely_same_dive(struct dive *a, struct dive *b)
if (fuzz < 60)
fuzz = 60;
- return ((a->when <= b->when + fuzz) && (a->when >= b->when - fuzz));
+ return (a->when <= b->when + fuzz) && (a->when >= b->when - fuzz);
}
/*
diff --git a/core/exif.cpp b/core/exif.cpp
index 8c47a514f..17983a0ff 100644
--- a/core/exif.cpp
+++ b/core/exif.cpp
@@ -897,6 +897,6 @@ time_t easyexif::EXIFInfo::epoch()
tm.tm_hour = hour;
tm.tm_min = min;
tm.tm_sec = sec;
- return (utc_mktime(&tm));
+ return utc_mktime(&tm);
}
diff --git a/core/git-access.c b/core/git-access.c
index 5619cf2a7..e9f17609b 100644
--- a/core/git-access.c
+++ b/core/git-access.c
@@ -728,7 +728,7 @@ static git_repository *create_and_push_remote(const char *localdir, const char *
/* finally create an empty commit and push it to the remote */
if (do_git_save(repo, branch, remote, false, true))
return NULL;
- return(repo);
+ return repo;
}
static git_repository *create_local_repo(const char *localdir, const char *remote, const char *branch, enum remote_transport rt)
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c
index c8afa47bf..be0bb01a5 100644
--- a/core/libdivecomputer.c
+++ b/core/libdivecomputer.c
@@ -1194,7 +1194,7 @@ dc_status_t libdc_buffer_parser(struct dive *dive, device_data_t *data, unsigned
return rc;
}
dc_parser_destroy(parser);
- return(DC_STATUS_SUCCESS);
+ return DC_STATUS_SUCCESS;
}
/*
diff --git a/core/linux.c b/core/linux.c
index de7991bc7..cbd71bcc8 100644
--- a/core/linux.c
+++ b/core/linux.c
@@ -228,5 +228,5 @@ void subsurface_console_exit(void)
bool subsurface_user_is_root()
{
- return (geteuid() == 0);
+ return geteuid() == 0;
}
diff --git a/core/macos.c b/core/macos.c
index 711b96a06..d2a760863 100644
--- a/core/macos.c
+++ b/core/macos.c
@@ -218,5 +218,5 @@ void subsurface_console_exit(void)
bool subsurface_user_is_root()
{
- return (geteuid() == 0);
+ return geteuid() == 0;
}
diff --git a/core/parse.c b/core/parse.c
index 69c064051..d83d8e331 100644
--- a/core/parse.c
+++ b/core/parse.c
@@ -187,8 +187,8 @@ void event_end(void)
*/
bool is_dive(void)
{
- return (cur_dive &&
- (cur_dive->dive_site_uuid || cur_dive->when || cur_dive->dc.samples));
+ return cur_dive &&
+ (cur_dive->dive_site_uuid || cur_dive->when || cur_dive->dc.samples);
}
void reset_dc_info(struct divecomputer *dc)
diff --git a/core/profile.c b/core/profile.c
index 78f3b2f57..373fb9640 100644
--- a/core/profile.c
+++ b/core/profile.c
@@ -1524,7 +1524,7 @@ struct plot_data *get_plot_details_new(struct plot_info *pi, int time, struct me
}
if (entry)
plot_string(pi, entry, mb);
- return (entry);
+ return entry;
}
/* Compare two plot_data entries and writes the results into a string */
diff --git a/core/qthelper.cpp b/core/qthelper.cpp
index af0db074c..9bf52e29a 100644
--- a/core/qthelper.cpp
+++ b/core/qthelper.cpp
@@ -49,7 +49,7 @@ QString weight_string(int weight_in_grams)
double lbs = grams_to_lbs(weight_in_grams);
str = QString("%1").arg(lbs, 0, 'f', lbs >= 40.0 ? 0 : 1);
}
- return (str);
+ return str;
}
QString distance_string(int distanceInMeters)
@@ -608,7 +608,7 @@ QString get_weight_string(weight_t weight, bool showunit)
} else {
str = QString("%1%2").arg(str).arg(showunit ? translate("gettextFromC", "lbs") : "");
}
- return (str);
+ return str;
}
QString get_weight_unit()
@@ -1017,7 +1017,7 @@ bool is_same_day(timestamp_t trip_when, timestamp_t dive_when)
utc_mkdate(twhen, &tmt);
}
- return ((tmd.tm_mday == tmt.tm_mday) && (tmd.tm_mon == tmt.tm_mon) && (tmd.tm_year == tmt.tm_year));
+ return (tmd.tm_mday == tmt.tm_mday) && (tmd.tm_mon == tmt.tm_mon) && (tmd.tm_year == tmt.tm_year);
}
QString get_trip_date_string(timestamp_t when, int nr, bool getday)
@@ -1195,7 +1195,7 @@ void hashPicture(struct picture *picture)
char *oldHash = copy_string(picture->hash);
learnHash(picture, hashFile(localFilePath(picture->filename)));
if (!empty_string(picture->hash) && !same_string(picture->hash, oldHash))
- mark_divelist_changed((true));
+ mark_divelist_changed(true);
free(oldHash);
picture_free(picture);
}
@@ -1499,7 +1499,7 @@ void setCurrentAppState(QByteArray state)
extern "C" bool in_planner()
{
- return (currentApplicationState == "PlanDive" || currentApplicationState == "EditPlannedDive");
+ return currentApplicationState == "PlanDive" || currentApplicationState == "EditPlannedDive";
}
extern "C" enum deco_mode decoMode()
diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp
index 1d1bb2f00..03735bd85 100644
--- a/core/subsurface-qt/DiveObjectHelper.cpp
+++ b/core/subsurface-qt/DiveObjectHelper.cpp
@@ -119,7 +119,7 @@ QString DiveObjectHelper::gps_decimal() const
prefs.coordinates_traditional = false;
val = gps();
prefs.coordinates_traditional = savep;
- return(val);
+ return val;
}
QString DiveObjectHelper::duration() const
diff --git a/core/subsurface-qt/SettingsObjectWrapper.cpp b/core/subsurface-qt/SettingsObjectWrapper.cpp
index 54b03aaf9..f508e993e 100644
--- a/core/subsurface-qt/SettingsObjectWrapper.cpp
+++ b/core/subsurface-qt/SettingsObjectWrapper.cpp
@@ -355,7 +355,7 @@ bool TechnicalDetailsSettings::calcndltts() const
bool TechnicalDetailsSettings::buehlmann() const
{
- return (prefs.planner_deco_mode == BUEHLMANN);
+ return prefs.planner_deco_mode == BUEHLMANN;
}
int TechnicalDetailsSettings::gflow() const
diff --git a/core/windows.c b/core/windows.c
index f0b9eb22c..393286a06 100644
--- a/core/windows.c
+++ b/core/windows.c
@@ -437,5 +437,5 @@ void subsurface_console_exit(void)
bool subsurface_user_is_root()
{
/* FIXME: Detect admin rights */
- return (false);
+ return false;
}
diff --git a/desktop-widgets/divelogimportdialog.cpp b/desktop-widgets/divelogimportdialog.cpp
index e05a71878..aa1359b9b 100644
--- a/desktop-widgets/divelogimportdialog.cpp
+++ b/desktop-widgets/divelogimportdialog.cpp
@@ -260,7 +260,7 @@ QVariant ColumnNameResult::data(const QModelIndex &index, int role) const
return QVariant();
if (index.row() == 0) {
- return (columnNames[index.column()]);
+ return columnNames[index.column()];
}
// make sure the element exists before returning it - this might get called before the
// model is correctly set up again (e.g., when changing separators)
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index 3a32263cc..b1ba31620 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -968,10 +968,10 @@ bool ProfileWidget2::isPointOutOfBoundaries(const QPointF &point) const
{
double xpos = timeAxis->valueAt(point);
double ypos = profileYAxis->valueAt(point);
- return (xpos > timeAxis->maximum() ||
- xpos < timeAxis->minimum() ||
- ypos > profileYAxis->maximum() ||
- ypos < profileYAxis->minimum());
+ return xpos > timeAxis->maximum() ||
+ xpos < timeAxis->minimum() ||
+ ypos > profileYAxis->maximum() ||
+ ypos < profileYAxis->minimum();
}
void ProfileWidget2::scrollViewTo(const QPoint &pos)
diff --git a/qt-models/divelocationmodel.cpp b/qt-models/divelocationmodel.cpp
index ad58f9c2f..8cd37a615 100644
--- a/qt-models/divelocationmodel.cpp
+++ b/qt-models/divelocationmodel.cpp
@@ -136,7 +136,7 @@ void LocationInformationModel::update()
QStringList LocationInformationModel::allSiteNames() const
{
- return(locationNames);
+ return locationNames;
}
bool LocationInformationModel::setData(const QModelIndex &index, const QVariant &value, int role)
@@ -200,5 +200,5 @@ bool filter_same_gps_cb (QAbstractItemModel *model, int sourceRow, const QModelI
if (ds->latitude.udeg == 0 || ds->longitude.udeg == 0)
return false;
- return (ds->latitude.udeg == ref_lat && ds->longitude.udeg == ref_lon && ds->uuid != ref_uuid);
+ return ds->latitude.udeg == ref_lat && ds->longitude.udeg == ref_lon && ds->uuid != ref_uuid;
}
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index 17d21fe64..614f194aa 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -178,7 +178,7 @@ bool DivePlannerPointsModel::updateMaxDepth()
if (p.depth.mm > displayed_dive.maxdepth.mm)
displayed_dive.maxdepth.mm = p.depth.mm;
}
- return (displayed_dive.maxdepth.mm != prevMaxDepth);
+ return displayed_dive.maxdepth.mm != prevMaxDepth;
}
void DivePlannerPointsModel::removeDeco()
diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp
index f0178d3e1..6eb94736d 100644
--- a/qt-models/filtermodels.cpp
+++ b/qt-models/filtermodels.cpp
@@ -408,7 +408,7 @@ bool MultiFilterSortModel::filterAcceptsRow(int source_row, const QModelIndex &s
ds = get_dive_site_by_uuid(d->dive_site_uuid);
if (!ds)
return false;
- return (same_string(ds->name, curr_dive_site->name) || ds->uuid == curr_dive_site->uuid);
+ return same_string(ds->name, curr_dive_site->name) || ds->uuid == curr_dive_site->uuid;
}
if (justCleared || models.isEmpty())
diff --git a/smtk-import/smartrak.c b/smtk-import/smartrak.c
index 227b07592..96b07a958 100644
--- a/smtk-import/smartrak.c
+++ b/smtk-import/smartrak.c
@@ -145,7 +145,7 @@ static unsigned int smtk_time_to_secs(char *t_buffer)
if (!empty_string(t_buffer)) {
n = sscanf(t_buffer, "%*[0-9/] %d:%d:%d ", &hr, &min, &sec);
- return((n == 3) ? (((hr*60)+min)*60)+sec : 0);
+ return (n == 3) ? (((hr*60)+min)*60)+sec : 0;
} else {
return 0;
}
diff --git a/theme/list_lib.js b/theme/list_lib.js
index ef5d2909c..34e4a6043 100644
--- a/theme/list_lib.js
+++ b/theme/list_lib.js
@@ -1147,7 +1147,7 @@ function mbar_to_bar(mbar)
function mbar_to_psi(mbar)
{
- return (mbar * 0.0145037738);
+ return mbar * 0.0145037738;
}
function mm_to_meter(mm)