From 5f01eb5d7a3927d31b7dd268562a59e3dacdd8e8 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Sat, 17 Jan 2015 01:18:38 +0100 Subject: fdo#39440 vcl: reduce scope of local variables This addresses some cppcheck warnings. Change-Id: Ibebfe89ad1874f5fa9e20fb76a534d9c2da01e3f Reviewed-on: https://gerrit.libreoffice.org/13969 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/source/glyphs/graphite_layout.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'vcl/source/glyphs') diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index 6f7cbb252ab0..f72b78035399 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -919,10 +919,9 @@ void GraphiteLayout::ApplyDXArray(ImplLayoutArgs &args, std::vector & rDelt size_t j = i + 1; int nLastChar = i; int nLastGlyph = nChar2Base; - int nChar2BaseJ = -1; for (; j < nChars; j++) { - nChar2BaseJ = mvChar2BaseGlyph[j]; + const int nChar2BaseJ = mvChar2BaseGlyph[j]; assert((nChar2BaseJ >= -1) && (nChar2BaseJ < (signed)mvGlyphs.size())); if (nChar2BaseJ != -1 ) { -- cgit v1.2.3