[PATCH] Remove C99 named initialisation

Henrik Brautaset Aronsen henrik at synth.no
Thu Apr 25 00:07:53 PDT 2013


Works for me, thanks!

H

Thiago Macieira wrote:
> This is one of the C99 features that C++ hasn't adopted (yet).
>
> And as we've discussed on IRC, we may want to avoid C99 since it does
> not look like MSVC will support it any time soon.
>
> Signed-off-by: Thiago Macieira<thiago at macieira.org>
> ---
>   qt-ui/models.cpp | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
> index cf64900..8108ad5 100644
> --- a/qt-ui/models.cpp
> +++ b/qt-ui/models.cpp
> @@ -431,7 +431,7 @@ DiveTripModel::DiveTripModel(QObject *parent) : QAbstractItemModel(parent)
>   	struct dive *d;
>
>   	for_each_dive(i, d) {
> -		weight_t tw = {.grams = total_weight(d)};
> +		weight_t tw = { total_weight(d) };
>   		new DiveItem(d->number,
>   			d->when,
>   			d->duration,


More information about the subsurface mailing list