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

Unified Diff: fpdfsdk/pdfwindow/PWL_EditCtrl.cpp

Issue 2341453002: CFX_FloatPoint default constructor and equals operators (Closed)
Patch Set: style Created 4 years, 3 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 | « fpdfsdk/pdfwindow/PWL_Edit.cpp ('k') | fpdfsdk/pdfwindow/PWL_Utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/pdfwindow/PWL_EditCtrl.cpp
diff --git a/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp
index 575fd39089dc0793a155c0a47e72539444f9f769..9d8b16a53c11618394a31f7f00faf27f61db282c 100644
--- a/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp
+++ b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp
@@ -328,11 +328,10 @@ CFX_FloatRect CPWL_EditCtrl::GetContentRect() const {
}
void CPWL_EditCtrl::SetEditCaret(FX_BOOL bVisible) {
- CFX_FloatPoint ptHead(0, 0), ptFoot(0, 0);
-
- if (bVisible) {
+ CFX_FloatPoint ptHead;
+ CFX_FloatPoint ptFoot;
+ if (bVisible)
GetCaretInfo(ptHead, ptFoot);
- }
CPVT_WordPlace wpTemp = m_pEdit->GetCaretWordPlace();
IOnSetCaret(bVisible, ptHead, ptFoot, wpTemp);
@@ -358,10 +357,9 @@ void CPWL_EditCtrl::GetCaretInfo(CFX_FloatPoint& ptHead,
}
void CPWL_EditCtrl::GetCaretPos(int32_t& x, int32_t& y) const {
- CFX_FloatPoint ptHead(0, 0), ptFoot(0, 0);
-
+ CFX_FloatPoint ptHead;
+ CFX_FloatPoint ptFoot;
GetCaretInfo(ptHead, ptFoot);
-
PWLtoWnd(ptHead, x, y);
}
« no previous file with comments | « fpdfsdk/pdfwindow/PWL_Edit.cpp ('k') | fpdfsdk/pdfwindow/PWL_Utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698