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

Unified Diff: core/include/fxcrt/fx_coordinates.h

Issue 1077083003: Fix the noisiest variable shadowing warnings in pdfium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fxcrt/fx_coordinates.h
diff --git a/core/include/fxcrt/fx_coordinates.h b/core/include/fxcrt/fx_coordinates.h
index a9afc5712e4135335ed6567d56f8fb85653bfbd8..c14b14c691b37bd8a6de3fbb1ee0db0f5282014b 100644
--- a/core/include/fxcrt/fx_coordinates.h
+++ b/core/include/fxcrt/fx_coordinates.h
@@ -132,9 +132,9 @@ public:
typedef CFX_PSVTemplate<baseType> FXT_POINT;
Tom Sepez 2015/04/10 21:33:05 nit: this types are shadows?
typedef CFX_PSVTemplate<baseType> FXT_SIZE;
typedef CFX_VTemplate<baseType> FXT_VECTOR;
- void Set(baseType x, baseType y)
+ void Set(baseType newx, baseType newy)
Tom Sepez 2015/04/10 21:00:04 why do we even need this method? Isn't there one
brucedawson 2015/04/10 21:29:50 A quick check shows that it is needed. fpdf_text_i
{
- FXT_PSV::x = x, FXT_PSV::y = y;
+ FXT_PSV::x = newx, FXT_PSV::y = newy;
Tom Sepez 2015/04/10 20:36:53 Can we get rid of the FXT_PSV:: qualifiers through
brucedawson 2015/04/10 21:29:50 I started doing that initially, and I'd be happy t
}
void Set(const FXT_PSV &psv)
{
@@ -165,26 +165,26 @@ public:
FXT_PSV::x = ((baseType)FXT_PSV::x) / fLen;
FXT_PSV::y = ((baseType)FXT_PSV::y) / fLen;
}
- baseType DotProduct(baseType x, baseType y) const
+ baseType DotProduct(baseType otherx, baseType othery) const
{
- return FXT_PSV::x * x + FXT_PSV::y * y;
+ return FXT_PSV::x * otherx + FXT_PSV::y * othery;
}
baseType DotProduct(const FXT_VECTOR &v) const
{
return FXT_PSV::x * v.x + FXT_PSV::y * v.y;
}
- FX_BOOL IsParallel(baseType x, baseType y) const
+ FX_BOOL IsParallel(baseType otherx, baseType othery) const
{
- baseType t = FXT_PSV::x * y - FXT_PSV::y * x;
+ baseType t = FXT_PSV::x * othery - FXT_PSV::y * otherx;
return FXSYS_fabs(t) < 0x0001f;
}
FX_BOOL IsParallel(const FXT_VECTOR &v) const
{
return IsParallel(v.x, v.y);
}
- FX_BOOL IsPerpendicular(baseType x, baseType y) const
+ FX_BOOL IsPerpendicular(baseType otherx, baseType othery) const
{
- baseType t = DotProduct(x, y);
+ baseType t = DotProduct(otherx, othery);
return FXSYS_fabs(t) < 0x0001f;
}
FX_BOOL IsPerpendicular(const FXT_VECTOR &v) const
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698