Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: core/fxcrt/fx_basic_coords.cpp

Issue 2034253003: Fix more code which has shadow variables (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments and style fix Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fxcodec/lgif/fx_gif.cpp ('k') | core/fxcrt/include/fx_coordinates.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include <limits.h> 7 #include <limits.h>
8 8
9 #include "core/fxcrt/include/fx_coordinates.h" 9 #include "core/fxcrt/include/fx_coordinates.h"
10 #include "core/fxcrt/include/fx_ext.h" 10 #include "core/fxcrt/include/fx_ext.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 const CFX_Matrix& m1, 277 const CFX_Matrix& m1,
278 const CFX_Matrix& m2) { 278 const CFX_Matrix& m2) {
279 FX_FLOAT aa = m1.a * m2.a + m1.b * m2.c; 279 FX_FLOAT aa = m1.a * m2.a + m1.b * m2.c;
280 FX_FLOAT bb = m1.a * m2.b + m1.b * m2.d; 280 FX_FLOAT bb = m1.a * m2.b + m1.b * m2.d;
281 FX_FLOAT cc = m1.c * m2.a + m1.d * m2.c; 281 FX_FLOAT cc = m1.c * m2.a + m1.d * m2.c;
282 FX_FLOAT dd = m1.c * m2.b + m1.d * m2.d; 282 FX_FLOAT dd = m1.c * m2.b + m1.d * m2.d;
283 FX_FLOAT ee = m1.e * m2.a + m1.f * m2.c + m2.e; 283 FX_FLOAT ee = m1.e * m2.a + m1.f * m2.c + m2.e;
284 FX_FLOAT ff = m1.e * m2.b + m1.f * m2.d + m2.f; 284 FX_FLOAT ff = m1.e * m2.b + m1.f * m2.d + m2.f;
285 m.a = aa, m.b = bb, m.c = cc, m.d = dd, m.e = ee, m.f = ff; 285 m.a = aa, m.b = bb, m.c = cc, m.d = dd, m.e = ee, m.f = ff;
286 } 286 }
287 void CFX_Matrix::Concat(FX_FLOAT a, 287 void CFX_Matrix::Concat(FX_FLOAT a_in,
288 FX_FLOAT b, 288 FX_FLOAT b_in,
289 FX_FLOAT c, 289 FX_FLOAT c_in,
290 FX_FLOAT d, 290 FX_FLOAT d_in,
291 FX_FLOAT e, 291 FX_FLOAT e_in,
292 FX_FLOAT f, 292 FX_FLOAT f_in,
293 FX_BOOL bPrepended) { 293 FX_BOOL bPrepended) {
294 CFX_Matrix m; 294 CFX_Matrix m;
295 m.Set(a, b, c, d, e, f); 295 m.Set(a_in, b_in, c_in, d_in, e_in, f_in);
296 Concat(m, bPrepended); 296 Concat(m, bPrepended);
297 } 297 }
298 void CFX_Matrix::Concat(const CFX_Matrix& m, FX_BOOL bPrepended) { 298 void CFX_Matrix::Concat(const CFX_Matrix& m, FX_BOOL bPrepended) {
299 if (bPrepended) { 299 if (bPrepended) {
300 FXCRT_Matrix_Concat(*this, m, *this); 300 FXCRT_Matrix_Concat(*this, m, *this);
301 } else { 301 } else {
302 FXCRT_Matrix_Concat(*this, *this, m); 302 FXCRT_Matrix_Concat(*this, *this, m);
303 } 303 }
304 } 304 }
305 void CFX_Matrix::ConcatInverse(const CFX_Matrix& src, FX_BOOL bPrepended) { 305 void CFX_Matrix::ConcatInverse(const CFX_Matrix& src, FX_BOOL bPrepended) {
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 left = x[i]; 508 left = x[i];
509 } 509 }
510 if (top < y[i]) { 510 if (top < y[i]) {
511 top = y[i]; 511 top = y[i];
512 } 512 }
513 if (bottom > y[i]) { 513 if (bottom > y[i]) {
514 bottom = y[i]; 514 bottom = y[i];
515 } 515 }
516 } 516 }
517 } 517 }
OLDNEW
« no previous file with comments | « core/fxcodec/lgif/fx_gif.cpp ('k') | core/fxcrt/include/fx_coordinates.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698