Re: [RESOLVED][PATCH] Remove unused code (ImpSvtData)

2012-04-25 Thread Caolán McNamara
On Tue, 2012-04-24 at 15:02 -0700, Javier Catala wrote:
> Hi everyone,
> 
> this patch removes the unused destructor in the ImpSvtData class, as listed 
> in unusedcode.easy

See
http://lists.freedesktop.org/archives/libreoffice/2012-April/030785.html
for the gotcha with unused destructors. I'll rework that code to get rid
of this "not actually so easy" unused method.

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [RESOLVED][PATCH] Remove unused code (ImpSvtData)

2012-04-25 Thread Caolán McNamara
On Wed, 2012-04-25 at 13:47 +0100, Caolán McNamara wrote:
> We should try and fix the leak and call the destructor somewhere rather
> than removing the destructor.

Refactored now to not leave that gotcha in the unusedcode.easy list.
Fixed.

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PATCH] Remove unused code (ImpSvtData)

2012-04-25 Thread Caolán McNamara
On Wed, 2012-04-25 at 05:16 -0700, Javier Catala wrote:
> Hi everyone,
> 
> This patch removes unused destructor in the ImpSvtData class, as listed in 
> unusedcode.easy

Yeah, but see unusedcode.README and "f". If the constructor used, but
the destructor is unused. Then its probably a leak and we should try and
fix the leak and call the destructor somewhere rather than removing the
destructor.

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Remove unused code (ImpSvtData)

2012-04-25 Thread Javier Catala
Hi everyone,

This patch removes unused destructor in the ImpSvtData class, as listed in 
unusedcode.easy
From bdfc550685d238a62602a4f93da0ab804d77b2f6 Mon Sep 17 00:00:00 2001
From: Javier Catala 
Date: Tue, 24 Apr 2012 20:24:17 +0200
Subject: [PATCH] Remove unused ImpSvtData destructor.

Committer: Javier Catala 

On branch master
Changes to be committed:

	modified:   svtools/inc/svtools/svtdata.hxx
	modified:   svtools/source/misc/svtdata.cxx
	modified:   unusedcode.easy
---
 svtools/inc/svtools/svtdata.hxx |2 --
 svtools/source/misc/svtdata.cxx |5 -
 unusedcode.easy |1 -
 3 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/svtools/inc/svtools/svtdata.hxx b/svtools/inc/svtools/svtdata.hxx
index 8689915..cb96bc5 100644
--- a/svtools/inc/svtools/svtdata.hxx
+++ b/svtools/inc/svtools/svtdata.hxx
@@ -48,8 +48,6 @@ private:
 pItemDesruptList(0), pResMgr(0)
 {}
 
-~ImpSvtData();
-
 public:
 ResMgr * GetResMgr(const ::com::sun::star::lang::Locale aLocale);
 ResMgr * GetResMgr(); // VCL dependant, only available in SVT, not in SVL!
diff --git a/svtools/source/misc/svtdata.cxx b/svtools/source/misc/svtdata.cxx
index 66489f1..62b6588 100644
--- a/svtools/source/misc/svtdata.cxx
+++ b/svtools/source/misc/svtdata.cxx
@@ -39,11 +39,6 @@
 //
 //
 
-ImpSvtData::~ImpSvtData()
-{
-delete pResMgr;
-}
-
 //
 ResMgr * ImpSvtData::GetResMgr(const ::com::sun::star::lang::Locale aLocale)
 {
diff --git a/unusedcode.easy b/unusedcode.easy
index d1f5e1d..3ab0009 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -10,7 +10,6 @@ HTMLControls::Insert(HTMLControl const**, unsigned short)
 HTMLControls::Insert(HTMLControls const*, unsigned short, unsigned short)
 HTMLControls::Remove(HTMLControl const*&, unsigned short)
 HTMLControls::Remove(unsigned short, unsigned short)
-ImpSvtData::~ImpSvtData()
 InsCapOptArr::Insert(InsCapOptArr const*, unsigned short, unsigned short)
 InsCapOptArr::Insert(InsCaptionOpt* const&, unsigned short&)
 InsCapOptArr::Insert(InsCaptionOpt* const*, unsigned short)
-- 
1.7.5.1

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Remove unused code (ImpSvtData)

2012-04-24 Thread Javier Catala
Hi everyone,

this patch removes the unused destructor in the ImpSvtData class, as listed in 
unusedcode.easy
From bdfc550685d238a62602a4f93da0ab804d77b2f6 Mon Sep 17 00:00:00 2001
From: Javier Catala 
Date: Tue, 24 Apr 2012 20:24:17 +0200
Subject: [PATCH] Remove unused ImpSvtData destructor.

Committer: Javier Catala 

On branch master
Changes to be committed:

	modified:   svtools/inc/svtools/svtdata.hxx
	modified:   svtools/source/misc/svtdata.cxx
	modified:   unusedcode.easy
---
 svtools/inc/svtools/svtdata.hxx |2 --
 svtools/source/misc/svtdata.cxx |5 -
 unusedcode.easy |1 -
 3 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/svtools/inc/svtools/svtdata.hxx b/svtools/inc/svtools/svtdata.hxx
index 8689915..cb96bc5 100644
--- a/svtools/inc/svtools/svtdata.hxx
+++ b/svtools/inc/svtools/svtdata.hxx
@@ -48,8 +48,6 @@ private:
 pItemDesruptList(0), pResMgr(0)
 {}
 
-~ImpSvtData();
-
 public:
 ResMgr * GetResMgr(const ::com::sun::star::lang::Locale aLocale);
 ResMgr * GetResMgr(); // VCL dependant, only available in SVT, not in SVL!
diff --git a/svtools/source/misc/svtdata.cxx b/svtools/source/misc/svtdata.cxx
index 66489f1..62b6588 100644
--- a/svtools/source/misc/svtdata.cxx
+++ b/svtools/source/misc/svtdata.cxx
@@ -39,11 +39,6 @@
 //
 //
 
-ImpSvtData::~ImpSvtData()
-{
-delete pResMgr;
-}
-
 //
 ResMgr * ImpSvtData::GetResMgr(const ::com::sun::star::lang::Locale aLocale)
 {
diff --git a/unusedcode.easy b/unusedcode.easy
index d1f5e1d..3ab0009 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -10,7 +10,6 @@ HTMLControls::Insert(HTMLControl const**, unsigned short)
 HTMLControls::Insert(HTMLControls const*, unsigned short, unsigned short)
 HTMLControls::Remove(HTMLControl const*&, unsigned short)
 HTMLControls::Remove(unsigned short, unsigned short)
-ImpSvtData::~ImpSvtData()
 InsCapOptArr::Insert(InsCapOptArr const*, unsigned short, unsigned short)
 InsCapOptArr::Insert(InsCaptionOpt* const&, unsigned short&)
 InsCapOptArr::Insert(InsCaptionOpt* const*, unsigned short)
-- 
1.7.5.1

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice