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

Side by Side Diff: fpdfsdk/src/fsdk_annothandler.cpp

Issue 1637693002: Fix a bunch of pointless returns. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: no core Created 4 years, 11 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 | « no previous file | fpdfsdk/src/fsdk_baseannot.cpp » ('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 <algorithm> 7 #include <algorithm>
8 8
9 #include "fpdfsdk/include/formfiller/FFL_FormFiller.h" 9 #include "fpdfsdk/include/formfiller/FFL_FormFiller.h"
10 #include "fpdfsdk/include/fsdk_annothandler.h" 10 #include "fpdfsdk/include/fsdk_annothandler.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 return pAnnotHandler->OnRButtonUp(pPageView, pAnnot, nFlags, point); 198 return pAnnotHandler->OnRButtonUp(pPageView, pAnnot, nFlags, point);
199 } 199 }
200 return FALSE; 200 return FALSE;
201 } 201 }
202 202
203 void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseEnter(CPDFSDK_PageView* pPageView, 203 void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseEnter(CPDFSDK_PageView* pPageView,
204 CPDFSDK_Annot* pAnnot, 204 CPDFSDK_Annot* pAnnot,
205 FX_DWORD nFlag) { 205 FX_DWORD nFlag) {
206 ASSERT(pAnnot); 206 ASSERT(pAnnot);
207 207
208 if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) { 208 if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot))
209 pAnnotHandler->OnMouseEnter(pPageView, pAnnot, nFlag); 209 pAnnotHandler->OnMouseEnter(pPageView, pAnnot, nFlag);
210 }
211 return;
212 } 210 }
213 211
214 void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseExit(CPDFSDK_PageView* pPageView, 212 void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseExit(CPDFSDK_PageView* pPageView,
215 CPDFSDK_Annot* pAnnot, 213 CPDFSDK_Annot* pAnnot,
216 FX_DWORD nFlag) { 214 FX_DWORD nFlag) {
217 ASSERT(pAnnot); 215 ASSERT(pAnnot);
218 216
219 if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) { 217 if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot))
220 pAnnotHandler->OnMouseExit(pPageView, pAnnot, nFlag); 218 pAnnotHandler->OnMouseExit(pPageView, pAnnot, nFlag);
221 }
222 return;
223 } 219 }
224 220
225 FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnChar(CPDFSDK_Annot* pAnnot, 221 FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnChar(CPDFSDK_Annot* pAnnot,
226 FX_DWORD nChar, 222 FX_DWORD nChar,
227 FX_DWORD nFlags) { 223 FX_DWORD nFlags) {
228 if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) { 224 if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) {
229 return pAnnotHandler->OnChar(pAnnot, nChar, nFlags); 225 return pAnnotHandler->OnChar(pAnnot, nChar, nFlags);
230 } 226 }
231 return FALSE; 227 return FALSE;
232 } 228 }
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 653
658 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() { 654 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() {
659 if (m_pos < m_iteratorAnnotList.size()) 655 if (m_pos < m_iteratorAnnotList.size())
660 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos]; 656 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos];
661 return nullptr; 657 return nullptr;
662 } 658 }
663 659
664 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() { 660 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() {
665 return m_bReverse ? PrevAnnot() : NextAnnot(); 661 return m_bReverse ? PrevAnnot() : NextAnnot();
666 } 662 }
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/src/fsdk_baseannot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698