summaryrefslogtreecommitdiff
path: root/xfa/fde
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-06-01 18:07:23 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-01 18:07:23 +0000
commit83a5063e117968b92bf96ba0fd2701f6c78e40a4 (patch)
tree6156b368dae25a52ce556c992a35da43c4900f66 /xfa/fde
parentc05ddc26a1e9c150d8f6ce60b08ea0b595143d9d (diff)
downloadpdfium-83a5063e117968b92bf96ba0fd2701f6c78e40a4.tar.xz
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 <hnakashima@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fde')
-rw-r--r--xfa/fde/cfde_texteditengine.cpp3
1 files changed, 1 insertions, 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;