From 5913a6ca71c85401e3f5317758d44a9fc4a667b2 Mon Sep 17 00:00:00 2001 From: tsepez Date: Wed, 16 Nov 2016 17:31:18 -0800 Subject: 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 --- core/fpdfapi/parser/cpdf_object.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'core/fpdfapi/parser/cpdf_object.h') diff --git a/core/fpdfapi/parser/cpdf_object.h b/core/fpdfapi/parser/cpdf_object.h index c24b40a789..9c41e9de7b 100644 --- a/core/fpdfapi/parser/cpdf_object.h +++ b/core/fpdfapi/parser/cpdf_object.h @@ -9,6 +9,7 @@ #include #include +#include #include "core/fxcrt/fx_string.h" #include "core/fxcrt/fx_system.h" @@ -117,4 +118,12 @@ class CPDF_Object { CPDF_Object(const CPDF_Object& src) {} }; +template +struct CanInternStrings { + static const bool value = std::is_same::value || + std::is_same::value || + std::is_same::value || + std::is_same::value; +}; + #endif // CORE_FPDFAPI_PARSER_CPDF_OBJECT_H_ -- cgit v1.2.3