From 1b99b2dcde9d8bf1a5944a7e0dac81ca33459af5 Mon Sep 17 00:00:00 2001 From: thestig Date: Fri, 20 May 2016 11:50:06 -0700 Subject: Merge GetBits32() impls into one. Put it in fxcrt. Review-Url: https://codereview.chromium.org/1990153003 --- core/fpdfapi/fpdf_page/fpdf_page_func.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'core/fpdfapi') diff --git a/core/fpdfapi/fpdf_page/fpdf_page_func.cpp b/core/fpdfapi/fpdf_page/fpdf_page_func.cpp index c9b0ea236e..bb1d631576 100644 --- a/core/fpdfapi/fpdf_page/fpdf_page_func.cpp +++ b/core/fpdfapi/fpdf_page/fpdf_page_func.cpp @@ -8,6 +8,7 @@ #include +#include #include #include #include @@ -504,15 +505,6 @@ FX_FLOAT PDF_Interpolate(FX_FLOAT x, return ymin + (divisor ? (x - xmin) * (ymax - ymin) / divisor : 0); } -uint32_t GetBits32(const uint8_t* pData, int bitpos, int nbits) { - int result = 0; - for (int i = 0; i < nbits; i++) { - if (pData[(bitpos + i) / 8] & (1 << (7 - (bitpos + i) % 8))) - result |= 1 << (nbits - i - 1); - } - return result; -} - class CPDF_PSFunc : public CPDF_Function { public: CPDF_PSFunc() : CPDF_Function(Type::kType4PostScript) {} -- cgit v1.2.3