summaryrefslogtreecommitdiff
path: root/core/fpdfdoc
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r--core/fpdfdoc/cpdf_filespec.cpp4
-rw-r--r--core/fpdfdoc/cpdf_interform.cpp4
-rw-r--r--core/fpdfdoc/cpdf_structelement.h4
3 files changed, 5 insertions, 7 deletions
diff --git a/core/fpdfdoc/cpdf_filespec.cpp b/core/fpdfdoc/cpdf_filespec.cpp
index 88abea30d5..95254b7bb8 100644
--- a/core/fpdfdoc/cpdf_filespec.cpp
+++ b/core/fpdfdoc/cpdf_filespec.cpp
@@ -138,7 +138,7 @@ const CPDF_Stream* CPDF_FileSpec::GetFileStream() const {
size_t end = pDict->GetStringFor("FS") == "URL" ? 2 : FX_ArraySize(kKeys);
for (size_t i = 0; i < end; ++i) {
- const ByteString& key = kKeys[i];
+ ByteString key = kKeys[i];
if (!pDict->GetUnicodeTextFor(key).IsEmpty()) {
const CPDF_Stream* pStream = pFiles->GetStreamFor(key);
if (pStream)
@@ -160,7 +160,7 @@ CPDF_Stream* CPDF_FileSpec::GetFileStream() {
size_t end = pDict->GetStringFor("FS") == "URL" ? 2 : FX_ArraySize(kKeys);
for (size_t i = 0; i < end; ++i) {
- const ByteString& key = kKeys[i];
+ ByteString key = kKeys[i];
if (!pDict->GetUnicodeTextFor(key).IsEmpty()) {
CPDF_Stream* pStream = pFiles->GetStreamFor(key);
if (pStream)
diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp
index b18310cfde..d7cee35704 100644
--- a/core/fpdfdoc/cpdf_interform.cpp
+++ b/core/fpdfdoc/cpdf_interform.cpp
@@ -379,9 +379,7 @@ class CFieldTree {
}
CPDF_FormField* GetField() const { return m_pField.get(); }
-
- const WideString& GetShortName() const { return m_ShortName; }
-
+ WideString GetShortName() const { return m_ShortName; }
int GetLevel() const { return m_level; }
private:
diff --git a/core/fpdfdoc/cpdf_structelement.h b/core/fpdfdoc/cpdf_structelement.h
index 4e590cb879..79e8dd92c8 100644
--- a/core/fpdfdoc/cpdf_structelement.h
+++ b/core/fpdfdoc/cpdf_structelement.h
@@ -39,8 +39,8 @@ class CPDF_StructElement : public Retainable {
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
- const ByteString& GetType() const { return m_Type; }
- const ByteString& GetTitle() const { return m_Title; }
+ ByteString GetType() const { return m_Type; }
+ ByteString GetTitle() const { return m_Title; }
const CPDF_Dictionary* GetDict() const { return m_pDict.Get(); }
size_t CountKids() const;