[PATCH] Use implicit zero initialize for the whole array.

Anton Lundin glance at acc.umu.se
Mon Dec 9 13:37:49 UTC 2013


Clang yelled about it, and it looks prettier. It also felt kinda strange
to explicit initialize the first element to zero and the rest to zero
implicit.

Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
 qt-ui/maintab.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 9810ab5..21451d9 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -442,7 +442,7 @@ void MainTab::updateDiveInfo(int dive)
 		ui.otuText->setText(QString("%1").arg(d->otu));
 		ui.waterTemperatureText->setText(get_temperature_string(d->watertemp, TRUE));
 		ui.airTemperatureText->setText(get_temperature_string(d->airtemp, TRUE));
-		volume_t gases[MAX_CYLINDERS] = { 0 };
+		volume_t gases[MAX_CYLINDERS] = {};
 		get_gas_used(d, gases);
 		QString volumes = get_volume_string(gases[0], TRUE);
 		int mean[MAX_CYLINDERS], duration[MAX_CYLINDERS];
-- 
1.8.3.2



More information about the subsurface mailing list