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

Side by Side Diff: fpdfsdk/src/formfiller/FFL_IFormFiller.cpp

Issue 1411663013: Cleanup: Remove some NULL checks in fpdfsdk. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: even simplier? Created 5 years, 1 month 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/fpdfeditpage.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 "../../include/formfiller/FFL_FormFiller.h" 7 #include "../../include/formfiller/FFL_FormFiller.h"
8 #include "../../include/formfiller/FFL_IFormFiller.h" 8 #include "../../include/formfiller/FFL_IFormFiller.h"
9 #include "../../include/formfiller/FFL_CheckBox.h" 9 #include "../../include/formfiller/FFL_CheckBox.h"
10 #include "../../include/formfiller/FFL_ComboBox.h" 10 #include "../../include/formfiller/FFL_ComboBox.h"
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 } 558 }
559 559
560 if (!pFormFiller) 560 if (!pFormFiller)
561 return nullptr; 561 return nullptr;
562 562
563 m_Maps[pAnnot] = pFormFiller; 563 m_Maps[pAnnot] = pFormFiller;
564 return pFormFiller; 564 return pFormFiller;
565 } 565 }
566 566
567 void CFFL_IFormFiller::RemoveFormFiller(CPDFSDK_Annot* pAnnot) { 567 void CFFL_IFormFiller::RemoveFormFiller(CPDFSDK_Annot* pAnnot) {
568 if (pAnnot != NULL) { 568 if (pAnnot) {
569 UnRegisterFormFiller(pAnnot); 569 UnRegisterFormFiller(pAnnot);
570 } 570 }
571 } 571 }
572 572
573 void CFFL_IFormFiller::UnRegisterFormFiller(CPDFSDK_Annot* pAnnot) { 573 void CFFL_IFormFiller::UnRegisterFormFiller(CPDFSDK_Annot* pAnnot) {
574 auto it = m_Maps.find(pAnnot); 574 auto it = m_Maps.find(pAnnot);
575 if (it == m_Maps.end()) 575 if (it == m_Maps.end())
576 return; 576 return;
577 577
578 delete it->second; 578 delete it->second;
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 bExit = TRUE; 872 bExit = TRUE;
873 m_bNotifying = FALSE; 873 m_bNotifying = FALSE;
874 return; 874 return;
875 } 875 }
876 } 876 }
877 877
878 m_bNotifying = FALSE; 878 m_bNotifying = FALSE;
879 } 879 }
880 } 880 }
881 } 881 }
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/src/fpdfeditpage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698