vcl: plugin: check that VclPtr is passed by reference
to avoid unnecessary increment/decrement traffic
Change-Id: Ice4e08df002b815105aa0b1c9430511c0cec3d28
Conflicts:
compilerplugins/clang/passstuffbyref.cxx
diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx
index 34902fb..265a831 100644
--- a/include/vcl/edit.hxx
+++ b/include/vcl/edit.hxx
@@ -237,7 +237,7 @@ public:
virtual const Link& GetModifyHdl() const { return maModifyHdl; }
virtual void SetUpdateDataHdl( const Link& rLink ) { maUpdateDataHdl = rLink; }
void SetSubEdit( VclPtr<Edit> pEdit );
void SetSubEdit( const VclPtr<Edit>& pEdit );
Edit* GetSubEdit() const { return mpSubEdit; }
boost::signals2::signal< void ( Edit* ) > autocompleteSignal;
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 4b7e271..e361ea9 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2706,7 +2706,7 @@ void Edit::ClearModifyFlag()
mbModified = false;
}
void Edit::SetSubEdit( VclPtr<Edit> pEdit )
void Edit::SetSubEdit( const VclPtr<Edit>& pEdit )
{
mpSubEdit.disposeAndClear();
mpSubEdit = pEdit;