diff options
author | Noel Grandin <noel@peralex.com> | 2014-06-18 12:14:29 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-06-24 11:34:21 +0200 |
commit | e2080e70fe8b085f18e868e46340454720fa94ca (patch) | |
tree | 4038d1d57b41b68a47d5ebbbe6ad390648ec6303 /vcl/generic/glyphs | |
parent | f910280b8704ed9c289150a4ca3c8d60e15d0d97 (diff) |
new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can
be returning a reference.
e.g.
class A {
struct X x;
public X* getX() { return &x; }
}
which can be:
public X& getX() { return x; }
Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
Diffstat (limited to 'vcl/generic/glyphs')
-rw-r--r-- | vcl/generic/glyphs/gcach_ftyp.cxx | 2 | ||||
-rw-r--r-- | vcl/generic/glyphs/gcach_ftyp.hxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx index 7ef4f8be8779..f8880b937456 100644 --- a/vcl/generic/glyphs/gcach_ftyp.cxx +++ b/vcl/generic/glyphs/gcach_ftyp.cxx @@ -615,7 +615,7 @@ boost::shared_ptr<ImplFontOptions> ServerFont::GetFontOptions() const return mpFontOptions; } -const OString* ServerFont::GetFontFileName() const +const OString& ServerFont::GetFontFileName() const { return mpFontInfo->GetFontFileName(); } diff --git a/vcl/generic/glyphs/gcach_ftyp.hxx b/vcl/generic/glyphs/gcach_ftyp.hxx index 7babff34e085..b43d47b39397 100644 --- a/vcl/generic/glyphs/gcach_ftyp.hxx +++ b/vcl/generic/glyphs/gcach_ftyp.hxx @@ -41,7 +41,7 @@ public: const unsigned char* GetBuffer() const { return mpFileMap; } int GetFileSize() const { return mnFileSize; } - const OString* GetFileName() const { return &maNativeFileName; } + const OString& GetFileName() const { return maNativeFileName; } int GetLangBoost() const { return mnLangBoost; } private: @@ -71,7 +71,7 @@ public: #endif void ReleaseFaceFT(); - const OString* GetFontFileName() const { return mpFontFile->GetFileName(); } + const OString& GetFontFileName() const { return mpFontFile->GetFileName(); } int GetFaceNum() const { return mnFaceNum; } int GetSynthetic() const { return mnSynthetic; } sal_IntPtr GetFontId() const { return mnFontId; } |