diff options
author | tsepez <tsepez@chromium.org> | 2016-04-11 18:14:56 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-11 18:14:56 -0700 |
commit | 822484b5f88d92dbcd567b1c2da38af1e720b56f (patch) | |
tree | de1902c744cbe38023432cc3f860d99df90beb70 /core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp | |
parent | e09c1e4db92e28a332f55aa3c80ceb44f4b74287 (diff) | |
download | pdfium-822484b5f88d92dbcd567b1c2da38af1e720b56f.tar.xz |
Remove CPDF_Object::GetConstString and overrides
GetConstString() has sharp edges in that when applied to
a CPDF_Number, it must return null whereas GetString() returns
a the stringified number, because of the inability to
control the lifetime of the underlying allocated string.
Deleting this method showed several places where we
actually wanted a *String, not a *StringC, so we were
re-allocating a string we already had.
Review URL: https://codereview.chromium.org/1879683002
Diffstat (limited to 'core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp')
-rw-r--r-- | core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp b/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp index 5f86a7bbc2..f03b14d8e1 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp @@ -68,12 +68,6 @@ CFX_ByteString CPDF_Dictionary::GetStringBy(const CFX_ByteStringC& key) const { return p ? p->GetString() : CFX_ByteString(); } -CFX_ByteStringC CPDF_Dictionary::GetConstStringBy( - const CFX_ByteStringC& key) const { - CPDF_Object* p = GetObjectBy(key); - return p ? p->GetConstString() : CFX_ByteStringC(); -} - CFX_WideString CPDF_Dictionary::GetUnicodeTextBy( const CFX_ByteStringC& key) const { CPDF_Object* p = GetObjectBy(key); @@ -88,13 +82,6 @@ CFX_ByteString CPDF_Dictionary::GetStringBy(const CFX_ByteStringC& key, return p ? p->GetString() : CFX_ByteString(def); } -CFX_ByteStringC CPDF_Dictionary::GetConstStringBy( - const CFX_ByteStringC& key, - const CFX_ByteStringC& def) const { - CPDF_Object* p = GetObjectBy(key); - return p ? p->GetConstString() : CFX_ByteStringC(def); -} - int CPDF_Dictionary::GetIntegerBy(const CFX_ByteStringC& key) const { CPDF_Object* p = GetObjectBy(key); return p ? p->GetInteger() : 0; |