summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-05-22 17:05:40 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-23 00:18:13 +0000
commitb45324bfb414acc595e478dc7dc63ac43c792580 (patch)
tree90af2bb4c6386b2b2825c80d7405dace0416c69b /core/fpdfapi/page
parent4cb82ee95256f110489f2b503e70729c44419e74 (diff)
downloadpdfium-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/page')
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.cpp3
-rw-r--r--core/fpdfapi/page/fpdf_page_colors.cpp9
-rw-r--r--core/fpdfapi/page/fpdf_page_func.cpp5
3 files changed, 10 insertions, 7 deletions
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index a5af1dbee0..e8594b927b 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -36,6 +36,7 @@
#include "core/fpdfapi/parser/fpdf_parser_decode.h"
#include "core/fxcrt/fx_safe_types.h"
#include "core/fxge/cfx_graphstatedata.h"
+#include "third_party/base/logging.h"
#include "third_party/base/ptr_util.h"
namespace {
@@ -389,7 +390,7 @@ CPDF_Object* CPDF_StreamContentParser::GetObject(uint32_t index) {
if (param.m_Type == ContentParam::OBJECT)
return param.m_pObject.get();
- ASSERT(false);
+ NOTREACHED();
return nullptr;
}
diff --git a/core/fpdfapi/page/fpdf_page_colors.cpp b/core/fpdfapi/page/fpdf_page_colors.cpp
index 3ba833f1ef..1526b75041 100644
--- a/core/fpdfapi/page/fpdf_page_colors.cpp
+++ b/core/fpdfapi/page/fpdf_page_colors.cpp
@@ -18,6 +18,7 @@
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
#include "core/fpdfapi/parser/cpdf_string.h"
#include "core/fxcodec/fx_codec.h"
+#include "third_party/base/logging.h"
#include "third_party/base/stl_util.h"
namespace {
@@ -105,7 +106,7 @@ bool CPDF_DeviceCS::GetRGB(float* pBuf, float* R, float* G, float* B) const {
}
return true;
default:
- ASSERT(false);
+ NOTREACHED();
return false;
}
}
@@ -141,7 +142,7 @@ bool CPDF_DeviceCS::SetRGB(float* pBuf, float R, float G, float B) const {
sRGB_to_AdobeCMYK(R, G, B, pBuf[0], pBuf[1], pBuf[2], pBuf[3]);
return true;
default:
- ASSERT(false);
+ NOTREACHED();
return false;
}
}
@@ -164,7 +165,7 @@ bool CPDF_DeviceCS::v_SetCMYK(float* pBuf,
pBuf[3] = k;
return true;
default:
- ASSERT(false);
+ NOTREACHED();
return false;
}
}
@@ -213,7 +214,7 @@ void CPDF_DeviceCS::TranslateImageLine(uint8_t* pDestBuf,
}
break;
default:
- ASSERT(false);
+ NOTREACHED();
break;
}
}
diff --git a/core/fpdfapi/page/fpdf_page_func.cpp b/core/fpdfapi/page/fpdf_page_func.cpp
index bc66adf726..48cd41c090 100644
--- a/core/fpdfapi/page/fpdf_page_func.cpp
+++ b/core/fpdfapi/page/fpdf_page_func.cpp
@@ -20,6 +20,7 @@
#include "core/fpdfapi/parser/cpdf_stream.h"
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
#include "core/fxcrt/fx_safe_types.h"
+#include "third_party/base/logging.h"
#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
@@ -127,13 +128,13 @@ class CPDF_PSOP {
if (m_op == PSOP_CONST)
return m_value;
- ASSERT(false);
+ NOTREACHED();
return 0;
}
CPDF_PSProc* GetProc() const {
if (m_op == PSOP_PROC)
return m_proc.get();
- ASSERT(false);
+ NOTREACHED();
return nullptr;
}