From e0ef6ffc2cbd383f45265b9ec3f2366f7dd19284 Mon Sep 17 00:00:00 2001 From: Googler Date: Wed, 2 Dec 2026 02:41:41 -0800 Subject: [PATCH] Default-initialize `PreviewImageData::Gps::latitude_ref` and `longitude_ref`. Initialize `latitude_ref = 'N'` and `longitude_ref = 'E'` (matching the inline `'N'`/`'S'` and `'E'`/`'W'` contract and pairing with the zeroed `0/1` coordinates as Null Island) so default-constructed `PreviewImageData` instances have no uninitialized members. PiperOrigin-RevId: 1034284847 --- src/piex_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/piex_types.h b/src/piex_types.h index cf33a21..35e2704 100644 --- a/src/piex_types.h +++ b/src/piex_types.h @@ -68,9 +68,9 @@ struct PreviewImageData { // Indicates if the gps data is valid to use. bool is_valid = false; - char latitude_ref; // Either 'N' or 'S' + char latitude_ref = 'N'; // Either 'N' or 'S' Rational latitude[3]; - char longitude_ref; // Either 'E' or 'W' + char longitude_ref = 'E'; // Either 'E' or 'W' Rational longitude[3]; bool altitude_ref = false; // true is above, false below sea level Rational altitude;