diff options
author | Jan Holesovsky <kendy@collabora.com> | 2019-04-02 23:03:01 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2019-04-03 17:54:02 +0200 |
commit | 9d5c868c04f53ac4d3c369e7596bdcfa512e289b (patch) | |
tree | 872244fc14178e6a8392899853c500033e027896 /vcl | |
parent | ba328bb8862810712393e2ce3329ce798db84541 (diff) |
pdfium: Returning a const std::shared_ptr<...>& is not recommended.
Change-Id: Iff6acef712c5b95c8cc222fc5293c9304b1c03ec
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/impgraph.hxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/graph.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/impgraph.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx index a80e780d00f6..fdae47ced329 100644 --- a/vcl/inc/impgraph.hxx +++ b/vcl/inc/impgraph.hxx @@ -174,7 +174,7 @@ private: const VectorGraphicDataPtr& getVectorGraphicData() const { return maVectorGraphicData; } - const std::shared_ptr<std::vector<sal_Int8>>& getPdfData() const; + std::shared_ptr<std::vector<sal_Int8>> getPdfData() const; void setPdfData(const std::shared_ptr<std::vector<sal_Int8>>& rPdfData); }; diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index bf8da62b15cf..2e6b70e10f53 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -617,14 +617,14 @@ void Graphic::setPdfData(const std::shared_ptr<std::vector<sal_Int8>>& rPdfData) mxImpGraphic->setPdfData(rPdfData); } -const std::shared_ptr<std::vector<sal_Int8>>& Graphic::getPdfData() const +std::shared_ptr<std::vector<sal_Int8>> Graphic::getPdfData() const { return mxImpGraphic->getPdfData(); } bool Graphic::hasPdfData() const { - std::shared_ptr<std::vector<sal_Int8>> pPdfData = getPdfData(); + std::shared_ptr<std::vector<sal_Int8>> pPdfData(getPdfData()); return pPdfData && !pPdfData->empty(); } diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 48f10e30a917..cd3d5b9a0c32 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -357,7 +357,7 @@ void ImpGraphic::setPdfData(const std::shared_ptr<std::vector<sal_Int8>>& rPdfDa mpPdfData = rPdfData; } -const std::shared_ptr<std::vector<sal_Int8>>& ImpGraphic::getPdfData() const +std::shared_ptr<std::vector<sal_Int8>> ImpGraphic::getPdfData() const { return mpPdfData; } |