From ec570e5f77986f6013ea42741001be5a3fcf47a7 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 30 Jul 2014 18:59:57 -0700 Subject: Fix a few -Wreorder warnings. BUG=pdfium:29 R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/427353003 --- core/src/fpdftext/fpdf_text_int.cpp | 25 +++++++++++-------------- fpdfsdk/include/fxedit/fxet_edit.h | 1 - fpdfsdk/include/javascript/JS_Object.h | 3 ++- fpdfsdk/src/fxedit/fxet_edit.cpp | 14 +++++++------- 4 files changed, 20 insertions(+), 23 deletions(-) diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp index ddf4762058..de4c703a04 100644 --- a/core/src/fpdftext/fpdf_text_int.cpp +++ b/core/src/fpdftext/fpdf_text_int.cpp @@ -68,10 +68,10 @@ IPDF_LinkExtract* IPDF_LinkExtract::CreateLinkExtract() #define TEXT_LINEFEED L"\n" #define TEXT_CHARRATIO_GAPDELTA 0.070 CPDF_TextPage::CPDF_TextPage(const CPDF_Page* pPage, int flags) - : m_pPreTextObj(NULL), - m_IsParsered(FALSE), - m_charList(512), + : m_charList(512), m_TempCharList(50), + m_pPreTextObj(NULL), + m_IsParsered(FALSE), m_TextlineDir(-1), m_CurlineRect(0, 0, 0, 0) { @@ -81,13 +81,13 @@ CPDF_TextPage::CPDF_TextPage(const CPDF_Page* pPage, int flags) pPage->GetDisplayMatrix(m_DisplayMatrix, 0, 0, (int) pPage->GetPageWidth(), (int)pPage->GetPageHeight(), 0); } CPDF_TextPage::CPDF_TextPage(const CPDF_Page* pPage, CPDFText_ParseOptions ParserOptions) - : m_pPreTextObj(NULL) - , m_IsParsered(FALSE) + : m_ParseOptions(ParserOptions) , m_charList(512) , m_TempCharList(50) + , m_pPreTextObj(NULL) + , m_IsParsered(FALSE) , m_TextlineDir(-1) , m_CurlineRect(0, 0, 0, 0) - , m_ParseOptions(ParserOptions) { m_pPage = pPage; m_parserflag = 0; @@ -95,10 +95,10 @@ CPDF_TextPage::CPDF_TextPage(const CPDF_Page* pPage, CPDFText_ParseOptions Parse pPage->GetDisplayMatrix(m_DisplayMatrix, 0, 0, (int) pPage->GetPageWidth(), (int)pPage->GetPageHeight(), 0); } CPDF_TextPage::CPDF_TextPage(const CPDF_PageObjects* pPage, int flags) - : m_pPreTextObj(NULL), - m_IsParsered(FALSE), - m_charList(512), + : m_charList(512), m_TempCharList(50), + m_pPreTextObj(NULL), + m_IsParsered(FALSE), m_TextlineDir(-1), m_CurlineRect(0, 0, 0, 0) { @@ -1036,9 +1036,6 @@ void CPDF_TextPage::ProcessObject() pPageObj = m_pPage->GetNextObject(pos); if(pPageObj) { if(pPageObj->m_Type == PDFPAGE_TEXT) { - if (nCount == 3) { - nCount = nCount; - } CFX_AffineMatrix matrix; ProcessTextObject((CPDF_TextObject*)pPageObj, matrix, pos); nCount++; @@ -2169,8 +2166,8 @@ FX_BOOL CPDF_TextPage::IsLetter(FX_WCHAR unicode) return TRUE; } CPDF_TextPageFind::CPDF_TextPageFind(const IPDF_TextPage* pTextPage) - : m_IsFind(FALSE), - m_pTextPage(NULL) + : m_pTextPage(NULL), + m_IsFind(FALSE) { if (!pTextPage) { return; diff --git a/fpdfsdk/include/fxedit/fxet_edit.h b/fpdfsdk/include/fxedit/fxet_edit.h index f65715b196..4b627c99c8 100644 --- a/fpdfsdk/include/fxedit/fxet_edit.h +++ b/fpdfsdk/include/fxedit/fxet_edit.h @@ -762,7 +762,6 @@ private: CFX_Edit_Undo m_Undo; FX_INT32 m_nAlignment; FX_BOOL m_bNotifyFlag; - FX_BOOL m_bTextFullFlag; FX_BOOL m_bEnableOverflow; FX_BOOL m_bEnableRefresh; CPDF_Rect m_rcOldContent; diff --git a/fpdfsdk/include/javascript/JS_Object.h b/fpdfsdk/include/javascript/JS_Object.h index f22da761fb..a6dac5d2a3 100644 --- a/fpdfsdk/include/javascript/JS_Object.h +++ b/fpdfsdk/include/javascript/JS_Object.h @@ -164,8 +164,9 @@ class CJS_Runtime; class CJS_Timer { public: - CJS_Timer(CJS_EmbedObj * pObj,CPDFDoc_Environment* pApp): m_pEmbedObj(pObj), + CJS_Timer(CJS_EmbedObj * pObj,CPDFDoc_Environment* pApp): m_nTimerID(0), + m_pEmbedObj(pObj), m_bProcessing(FALSE), m_dwStartTime(0), m_dwTimeOut(0), diff --git a/fpdfsdk/src/fxedit/fxet_edit.cpp b/fpdfsdk/src/fxedit/fxet_edit.cpp index efc7acdca5..2d25ba3383 100644 --- a/fpdfsdk/src/fxedit/fxet_edit.cpp +++ b/fpdfsdk/src/fxedit/fxet_edit.cpp @@ -871,12 +871,12 @@ CFXEU_SetSecProps::CFXEU_SetSecProps(CFX_Edit * pEdit, const CPVT_WordPlace & pl const CPVT_SecProps & newsecprops, const CPVT_WordProps & newwordprops, const CPVT_WordRange & range) : m_pEdit(pEdit), m_wpPlace(place), + m_wrPlace(range), m_eProps(ep), m_OldSecProps(oldsecprops), m_NewSecProps(newsecprops), m_OldWordProps(oldwordprops), - m_NewWordProps(newwordprops), - m_wrPlace(range) + m_NewWordProps(newwordprops) { } @@ -918,10 +918,10 @@ CFXEU_SetWordProps::CFXEU_SetWordProps(CFX_Edit * pEdit, const CPVT_WordPlace & const CPVT_WordProps & oldprops, const CPVT_WordProps & newprops, const CPVT_WordRange & range) : m_pEdit(pEdit), m_wpPlace(place), + m_wrPlace(range), m_eProps(ep), m_OldWordProps(oldprops), - m_NewWordProps(newprops), - m_wrPlace(range) + m_NewWordProps(newprops) { } @@ -963,19 +963,19 @@ CFX_Edit::CFX_Edit(IPDF_VariableText * pVT) : m_pVT(pVT), m_pNotify(NULL), m_pOprNotify(NULL), + m_pVTProvide(NULL), m_wpCaret(-1,-1,-1), m_wpOldCaret(-1,-1,-1), + m_SelState(), m_ptScrollPos(0,0), m_ptRefreshScrollPos(0,0), m_bEnableScroll(FALSE), - m_bEnableOverflow(FALSE), - m_pVTProvide(NULL), m_pIterator(NULL), - m_SelState(), m_ptCaret(0.0f,0.0f), m_Undo(FX_EDIT_UNDO_MAXITEM), m_nAlignment(0), m_bNotifyFlag(FALSE), + m_bEnableOverflow(FALSE), m_bEnableRefresh(TRUE), m_rcOldContent(0.0f,0.0f,0.0f,0.0f), m_bEnableUndo(TRUE), -- cgit v1.2.3