mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 22:26:16 +00:00
code cleanup: initialize all elements in structure
This seems silly. I don't like that warning and would rather disable the warning. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
44ddb1411e
commit
e6210aafc5
2 changed files with 7 additions and 7 deletions
|
@ -469,10 +469,10 @@ ImportDives::ImportDives(struct dive_table *dives, struct trip_table *trips, str
|
||||||
// this only matters if undoit were called before redoit
|
// this only matters if undoit were called before redoit
|
||||||
currentDive = nullptr;
|
currentDive = nullptr;
|
||||||
|
|
||||||
struct dive_table dives_to_add = { 0 };
|
struct dive_table dives_to_add = { 0, 0, 0 };
|
||||||
struct dive_table dives_to_remove = { 0 };
|
struct dive_table dives_to_remove = { 0, 0, 0 };
|
||||||
struct trip_table trips_to_add = { 0 };
|
struct trip_table trips_to_add = { 0, 0, 0 };
|
||||||
struct dive_site_table sites_to_add = { 0 };
|
struct dive_site_table sites_to_add = { 0, 0, 0 };
|
||||||
process_imported_dives(dives, trips, sites, flags, &dives_to_add, &dives_to_remove, &trips_to_add, &sites_to_add);
|
process_imported_dives(dives, trips, sites, flags, &dives_to_add, &dives_to_remove, &trips_to_add, &sites_to_add);
|
||||||
|
|
||||||
// Add trips to the divesToAdd.trips structure
|
// Add trips to the divesToAdd.trips structure
|
||||||
|
|
|
@ -264,12 +264,12 @@ void LocationInformationWidget::reverseGeocode()
|
||||||
location_t location = parseGpsText(ui.diveSiteCoordinates->text());
|
location_t location = parseGpsText(ui.diveSiteCoordinates->text());
|
||||||
if (!diveSite || !has_location(&location))
|
if (!diveSite || !has_location(&location))
|
||||||
return;
|
return;
|
||||||
taxonomy_data taxonomy = { 0 };
|
taxonomy_data taxonomy = { 0, 0 };
|
||||||
reverseGeoLookup(location.lat, location.lon, &taxonomy);
|
reverseGeoLookup(location.lat, location.lon, &taxonomy);
|
||||||
Command::editDiveSiteTaxonomy(diveSite, taxonomy);
|
Command::editDiveSiteTaxonomy(diveSite, taxonomy);
|
||||||
}
|
}
|
||||||
|
|
||||||
DiveLocationFilterProxyModel::DiveLocationFilterProxyModel(QObject *) : currentLocation({0, 0})
|
DiveLocationFilterProxyModel::DiveLocationFilterProxyModel(QObject *) : currentLocation({{0}, {0}})
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -573,7 +573,7 @@ void DiveLocationLineEdit::setCurrentDiveSite(struct dive *d)
|
||||||
currentLocation = dive_get_gps_location(d);
|
currentLocation = dive_get_gps_location(d);
|
||||||
} else {
|
} else {
|
||||||
currDs = nullptr;
|
currDs = nullptr;
|
||||||
currentLocation = location_t{0, 0};
|
currentLocation = location_t{{0}, {0}};
|
||||||
}
|
}
|
||||||
if (!currDs)
|
if (!currDs)
|
||||||
clear();
|
clear();
|
||||||
|
|
Loading…
Add table
Reference in a new issue