Rename _CPDF_UniqueKeyGen to CPDF_UniqueKeyGen
Review URL: https://codereview.chromium.org/1841313004
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
index c38362f..0165e8a 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
@@ -23,6 +23,27 @@
#include "core/fpdfapi/fpdf_render/include/cpdf_textrenderer.h"
#include "core/include/fxge/fx_ge.h"
+namespace {
+
+struct CPDF_UniqueKeyGen {
+ void Generate(int count, ...);
+ FX_CHAR m_Key[128];
+ int m_KeyLen;
+};
+
+void CPDF_UniqueKeyGen::Generate(int count, ...) {
+ va_list argList;
+ va_start(argList, count);
+ for (int i = 0; i < count; i++) {
+ int p = va_arg(argList, int);
+ ((uint32_t*)m_Key)[i] = p;
+ }
+ va_end(argList);
+ m_KeyLen = count * sizeof(uint32_t);
+}
+
+} // namespace
+
CPDF_Type3Cache::~CPDF_Type3Cache() {
for (const auto& pair : m_SizeMap) {
delete pair.second;
@@ -33,7 +54,7 @@
const CFX_Matrix* pMatrix,
FX_FLOAT retinaScaleX,
FX_FLOAT retinaScaleY) {
- _CPDF_UniqueKeyGen keygen;
+ CPDF_UniqueKeyGen keygen;
keygen.Generate(
4, FXSYS_round(pMatrix->a * 10000), FXSYS_round(pMatrix->b * 10000),
FXSYS_round(pMatrix->c * 10000), FXSYS_round(pMatrix->d * 10000));
@@ -187,16 +208,7 @@
delete pResBitmap;
return pGlyph;
}
-void _CPDF_UniqueKeyGen::Generate(int count, ...) {
- va_list argList;
- va_start(argList, count);
- for (int i = 0; i < count; i++) {
- int p = va_arg(argList, int);
- ((uint32_t*)m_Key)[i] = p;
- }
- va_end(argList);
- m_KeyLen = count * sizeof(uint32_t);
-}
+
FX_BOOL CPDF_RenderStatus::ProcessText(const CPDF_TextObject* textobj,
const CFX_Matrix* pObj2Device,
CFX_PathData* pClippingPath) {
diff --git a/core/fpdfapi/fpdf_render/render_int.h b/core/fpdfapi/fpdf_render/render_int.h
index a3b8d76..b22b9fc 100644
--- a/core/fpdfapi/fpdf_render/render_int.h
+++ b/core/fpdfapi/fpdf_render/render_int.h
@@ -636,10 +636,4 @@
const uint8_t* m_RampB;
};
-struct _CPDF_UniqueKeyGen {
- void Generate(int count, ...);
- FX_CHAR m_Key[128];
- int m_KeyLen;
-};
-
#endif // CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_