From 83a5063e117968b92bf96ba0fd2701f6c78e40a4 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Fri, 1 Jun 2018 18:07:23 +0000 Subject: Move variable into loop scope The variable is not used outside of the loop. This was noted by tsepez@ after landing the initial CL to clean up this code. Change-Id: Id7d6713db4fa6bdfe867c151290cb28329ae7042 Reviewed-on: https://pdfium-review.googlesource.com/33590 Reviewed-by: Henrique Nakashima Reviewed-by: Tom Sepez Commit-Queue: Ryan Harrison --- xfa/fde/cfde_texteditengine.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xfa/fde/cfde_texteditengine.cpp b/xfa/fde/cfde_texteditengine.cpp index 6c1e8dcc6c..71b413c35f 100644 --- a/xfa/fde/cfde_texteditengine.cpp +++ b/xfa/fde/cfde_texteditengine.cpp @@ -439,10 +439,9 @@ size_t CFDE_TextEditEngine::GetIndexLeft(size_t pos) const { return 0; --pos; - wchar_t ch; while (pos != 0) { // We want to be on the location just before the \r or \n - ch = GetChar(pos - 1); + wchar_t ch = GetChar(pos - 1); if (ch != '\r' && ch != '\n') break; -- cgit v1.2.3