diff options
author | thestig <thestig@chromium.org> | 2016-05-12 10:41:56 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-12 10:41:56 -0700 |
commit | 732f6a01f11749192badba3d5151a33460560b7f (patch) | |
tree | 97898803a9f794d62caa608b456ab5f4a3e24ac0 /fpdfsdk/pdfwindow/PWL_Label.cpp | |
parent | aadedf904d6e072e885f6ccd142c5f874833d5c5 (diff) | |
download | pdfium-732f6a01f11749192badba3d5151a33460560b7f.tar.xz |
IFX_Edit::NewEdit never returns nullptr.
Review-Url: https://codereview.chromium.org/1969353002
Diffstat (limited to 'fpdfsdk/pdfwindow/PWL_Label.cpp')
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Label.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_Label.cpp b/fpdfsdk/pdfwindow/PWL_Label.cpp index 9cb9791444..7abeb0d558 100644 --- a/fpdfsdk/pdfwindow/PWL_Label.cpp +++ b/fpdfsdk/pdfwindow/PWL_Label.cpp @@ -9,10 +9,7 @@ #include "fpdfsdk/pdfwindow/PWL_Utils.h" #include "fpdfsdk/pdfwindow/PWL_Wnd.h" -CPWL_Label::CPWL_Label() : m_pEdit(NULL) { - m_pEdit = IFX_Edit::NewEdit(); - ASSERT(m_pEdit); -} +CPWL_Label::CPWL_Label() : m_pEdit(IFX_Edit::NewEdit()) {} CPWL_Label::~CPWL_Label() { IFX_Edit::DelEdit(m_pEdit); @@ -144,8 +141,5 @@ void CPWL_Label::SetLimitChar(int32_t nLimitChar) { } int32_t CPWL_Label::GetTotalWords() { - if (m_pEdit) - return m_pEdit->GetTotalWords(); - - return 0; + return m_pEdit->GetTotalWords(); } |