aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-09-15 09:39:17 +1000
committerNeil <nyamatongwe@gmail.com>2021-09-15 09:39:17 +1000
commit3073106115483a07dab4d9bc54519fb218d3c6d3 (patch)
tree907d513d51c91162f485b99e98a3536b6edb50d4
parentbd26e824df79006bf8f5385e8d604d8fcbc01eae (diff)
downloadscintilla-mirror-3073106115483a07dab4d9bc54519fb218d3c6d3.tar.gz
Ensure variable initialised.
-rw-r--r--src/ViewStyle.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index 8d2421b7a..4133fcc5f 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -73,7 +73,7 @@ void FontRealised::Realise(Surface &surface, int zoomLevel, Technology technolog
constexpr std::string_view allASCIIGraphic("Ayfi"
// python: ''.join(chr(ch) for ch in range(32, 127))
" !\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
- std::array<XYPOSITION, allASCIIGraphic.length()> positions;
+ std::array<XYPOSITION, allASCIIGraphic.length()> positions {};
surface.MeasureWidthsUTF8(font.get(), allASCIIGraphic, positions.data());
std::adjacent_difference(positions.begin(), positions.end(), positions.begin());
const XYPOSITION maxWidth = *std::max_element(positions.begin(), positions.end());