diff options
author | Lei Zhang <thestig@chromium.org> | 2017-05-22 17:05:40 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-23 00:18:13 +0000 |
commit | b45324bfb414acc595e478dc7dc63ac43c792580 (patch) | |
tree | 90af2bb4c6386b2b2825c80d7405dace0416c69b /core/fpdfapi/parser | |
parent | 4cb82ee95256f110489f2b503e70729c44419e74 (diff) | |
download | pdfium-b45324bfb414acc595e478dc7dc63ac43c792580.tar.xz |
Use NOTREACHED() in more places.
Change-Id: I88466943171f19259f84add69679741d44c8e123
Reviewed-on: https://pdfium-review.googlesource.com/5551
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r-- | core/fpdfapi/parser/cpdf_array.cpp | 2 | ||||
-rw-r--r-- | core/fpdfapi/parser/cpdf_object.cpp | 3 | ||||
-rw-r--r-- | core/fpdfapi/parser/fpdf_parser_utility.cpp | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/core/fpdfapi/parser/cpdf_array.cpp b/core/fpdfapi/parser/cpdf_array.cpp index 698cd6d0d0..4caad10631 100644 --- a/core/fpdfapi/parser/cpdf_array.cpp +++ b/core/fpdfapi/parser/cpdf_array.cpp @@ -162,7 +162,7 @@ CPDF_Object* CPDF_Array::SetAt(size_t i, std::unique_ptr<CPDF_Object> pObj) { ASSERT(IsArray()); ASSERT(!pObj || pObj->IsInline()); if (i >= m_Objects.size()) { - ASSERT(false); + NOTREACHED(); return nullptr; } CPDF_Object* pRet = pObj.get(); diff --git a/core/fpdfapi/parser/cpdf_object.cpp b/core/fpdfapi/parser/cpdf_object.cpp index f0ff81eeed..82c3b09416 100644 --- a/core/fpdfapi/parser/cpdf_object.cpp +++ b/core/fpdfapi/parser/cpdf_object.cpp @@ -14,6 +14,7 @@ #include "core/fpdfapi/parser/cpdf_parser.h" #include "core/fpdfapi/parser/fpdf_parser_decode.h" #include "core/fxcrt/fx_string.h" +#include "third_party/base/logging.h" #include "third_party/base/stl_util.h" CPDF_Object::~CPDF_Object() {} @@ -59,7 +60,7 @@ CPDF_Dictionary* CPDF_Object::GetDict() const { } void CPDF_Object::SetString(const CFX_ByteString& str) { - ASSERT(false); + NOTREACHED(); } bool CPDF_Object::IsArray() const { diff --git a/core/fpdfapi/parser/fpdf_parser_utility.cpp b/core/fpdfapi/parser/fpdf_parser_utility.cpp index af109e35aa..0cd4ca9225 100644 --- a/core/fpdfapi/parser/fpdf_parser_utility.cpp +++ b/core/fpdfapi/parser/fpdf_parser_utility.cpp @@ -16,6 +16,7 @@ #include "core/fpdfapi/parser/cpdf_string.h" #include "core/fpdfapi/parser/fpdf_parser_decode.h" #include "core/fxcrt/fx_extension.h" +#include "third_party/base/logging.h" // Indexed by 8-bit character code, contains either: // 'W' - for whitespace: NUL, TAB, CR, LF, FF, SPACE, 0x80, 0xff @@ -215,7 +216,7 @@ CFX_ByteTextBuf& operator<<(CFX_ByteTextBuf& buf, const CPDF_Object* pObj) { break; } default: - ASSERT(false); + NOTREACHED(); break; } return buf; |