summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-11-16 17:31:18 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-16 17:31:18 -0800
commit5913a6ca71c85401e3f5317758d44a9fc4a667b2 (patch)
tree388ad0bd98b44a47c251568e198e2c3c231c7d30 /core/fpdfapi/font
parentcc4d0a44f3025821f88f3ed1ee78dfdc416487c7 (diff)
downloadpdfium-5913a6ca71c85401e3f5317758d44a9fc4a667b2.tar.xz
Make CPDF_Object subclass constructors intern strings
Make CDPF_Arrays intern the object they create. Allow passing nullptr as a CFX_WeakPtr shortcut as well. Review-Url: https://codereview.chromium.org/2509123002
Diffstat (limited to 'core/fpdfapi/font')
-rw-r--r--core/fpdfapi/font/cpdf_fontencoding.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/font/cpdf_fontencoding.cpp b/core/fpdfapi/font/cpdf_fontencoding.cpp
index 3537330def..da607e6aa8 100644
--- a/core/fpdfapi/font/cpdf_fontencoding.cpp
+++ b/core/fpdfapi/font/cpdf_fontencoding.cpp
@@ -1689,13 +1689,13 @@ CPDF_Object* CPDF_FontEncoding::Realize(CFX_WeakPtr<CFX_ByteStringPool> pPool) {
}
if (predefined) {
if (predefined == PDFFONT_ENCODING_WINANSI) {
- return new CPDF_Name(pPool->Intern("WinAnsiEncoding"));
+ return new CPDF_Name(pPool, "WinAnsiEncoding");
}
if (predefined == PDFFONT_ENCODING_MACROMAN) {
- return new CPDF_Name(pPool->Intern("MacRomanEncoding"));
+ return new CPDF_Name(pPool, "MacRomanEncoding");
}
if (predefined == PDFFONT_ENCODING_MACEXPERT) {
- return new CPDF_Name(pPool->Intern("MacExpertEncoding"));
+ return new CPDF_Name(pPool, "MacExpertEncoding");
}
return nullptr;
}