[Libreoffice-commits] core.git: 2 commits - filter/qa filter/source stoc/source
Caolán McNamara
caolanm at redhat.com
Wed Jul 15 12:44:39 PDT 2015
filter/qa/cppunit/data/met/fail/crash-1.met |binary
filter/source/graphicfilter/ios2met/ios2met.cxx | 7 ++++---
stoc/source/corereflection/base.hxx | 2 +-
stoc/source/implementationregistration/implreg.cxx | 2 +-
stoc/source/inspect/introspection.cxx | 2 +-
stoc/source/invocation/invocation.cxx | 2 +-
stoc/source/invocation_adapterfactory/iafactory.cxx | 2 +-
stoc/source/javaloader/javaloader.cxx | 2 +-
stoc/source/loader/dllcomponentloader.cxx | 2 +-
stoc/source/security/access_controller.cxx | 18 +++++++-----------
10 files changed, 18 insertions(+), 21 deletions(-)
New commits:
commit 1a3eedccd3f2c207b274e589c509975d3859f8f8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 15 20:26:40 2015 +0100
cppcheck: noExplicitConstructor
Change-Id: Ia86c6a2ce6c1f2501d0b18181966b61d9ef78746
diff --git a/stoc/source/corereflection/base.hxx b/stoc/source/corereflection/base.hxx
index 426c2d2..2b27934 100644
--- a/stoc/source/corereflection/base.hxx
+++ b/stoc/source/corereflection/base.hxx
@@ -111,7 +111,7 @@ public:
uno_Interface * mapToUno( const css::uno::Any & rObj, typelib_InterfaceTypeDescription * pTo ) throw(css::uno::RuntimeException);
// ctor/ dtor
- IdlReflectionServiceImpl( const css::uno::Reference< css::uno::XComponentContext > & xContext );
+ explicit IdlReflectionServiceImpl( const css::uno::Reference< css::uno::XComponentContext > & xContext );
virtual ~IdlReflectionServiceImpl();
// XInterface
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index e7d904e..825723b 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -1199,7 +1199,7 @@ class ImplementationRegistration
: public WeakImplHelper3< XImplementationRegistration2, XServiceInfo, XInitialization >
{
public:
- ImplementationRegistration( const Reference < XComponentContext > & rSMgr );
+ explicit ImplementationRegistration( const Reference < XComponentContext > & rSMgr );
virtual ~ImplementationRegistration();
// XServiceInfo
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index c92d636..2b5f3d6 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -233,7 +233,7 @@ class IntrospectionAccessStatic_Impl: public salhelper::SimpleReferenceObject
sal_Int32 iNextIndex );
public:
- IntrospectionAccessStatic_Impl( Reference< XIdlReflection > xCoreReflection_ );
+ explicit IntrospectionAccessStatic_Impl( Reference< XIdlReflection > xCoreReflection_ );
virtual ~IntrospectionAccessStatic_Impl()
{
delete[] mpOrgPropertyHandleArray;
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index 8d195e9..ab31ab2 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -1051,7 +1051,7 @@ class InvocationService
: public WeakImplHelper2< XSingleServiceFactory, XServiceInfo >
{
public:
- InvocationService( const Reference<XComponentContext> & xCtx );
+ explicit InvocationService( const Reference<XComponentContext> & xCtx );
virtual ~InvocationService();
// XServiceInfo
diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx
index dca1c97..447264c 100644
--- a/stoc/source/invocation_adapterfactory/iafactory.cxx
+++ b/stoc/source/invocation_adapterfactory/iafactory.cxx
@@ -100,7 +100,7 @@ public:
Mutex m_mutex;
t_ptr_map m_receiver2adapters;
- FactoryImpl( Reference< XComponentContext > const & xContext );
+ explicit FactoryImpl( Reference< XComponentContext > const & xContext );
virtual ~FactoryImpl();
// XServiceInfo
diff --git a/stoc/source/javaloader/javaloader.cxx b/stoc/source/javaloader/javaloader.cxx
index ea09b30..d9355d5 100644
--- a/stoc/source/javaloader/javaloader.cxx
+++ b/stoc/source/javaloader/javaloader.cxx
@@ -100,7 +100,7 @@ class JavaComponentLoader : public WeakImplHelper2<XImplementationLoader, XServi
public:
- JavaComponentLoader(const css::uno::Reference<XComponentContext> & xCtx)
+ explicit JavaComponentLoader(const css::uno::Reference<XComponentContext> & xCtx)
throw(RuntimeException);
virtual ~JavaComponentLoader() throw();
diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx
index 14f4942..bb99a99 100644
--- a/stoc/source/loader/dllcomponentloader.cxx
+++ b/stoc/source/loader/dllcomponentloader.cxx
@@ -58,7 +58,7 @@ class DllComponentLoader
XServiceInfo >
{
public:
- DllComponentLoader( const Reference<XComponentContext> & xCtx );
+ explicit DllComponentLoader( const Reference<XComponentContext> & xCtx );
virtual ~DllComponentLoader();
// XServiceInfo
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index c59153f..fd709b1 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -188,8 +188,11 @@ class acc_Policy
PermissionCollection m_permissions;
public:
- inline acc_Policy(
- PermissionCollection const & permissions );
+ explicit acc_Policy(
+ PermissionCollection const & permissions )
+ : m_permissions( permissions )
+ {}
+
virtual ~acc_Policy();
// XAccessControlContext impl
@@ -198,11 +201,6 @@ public:
throw (RuntimeException, std::exception) SAL_OVERRIDE;
};
-inline acc_Policy::acc_Policy(
- PermissionCollection const & permissions )
- : m_permissions( permissions )
-{}
-
acc_Policy::~acc_Policy()
{}
@@ -292,14 +290,12 @@ class cc_reset
{
void * m_cc;
public:
- inline cc_reset( void * cc )
+ explicit cc_reset( void * cc )
: m_cc( cc ) {}
inline ~cc_reset()
{ ::uno_setCurrentContext( m_cc, s_envType.pData, 0 ); }
};
-
-
struct MutexHolder
{
Mutex m_mutex;
@@ -343,7 +339,7 @@ protected:
virtual void SAL_CALL disposing() SAL_OVERRIDE;
public:
- AccessController( Reference< XComponentContext > const & xComponentContext );
+ explicit AccessController( Reference< XComponentContext > const & xComponentContext );
virtual ~AccessController();
// XInitialization impl
commit dc71a72753202d29544845cfd58992bac63c6837
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 15 12:25:35 2015 +0100
bump size type
Change-Id: I2c32c253499a3efb22a3312ed1f0a608649ce124
diff --git a/filter/qa/cppunit/data/met/fail/crash-1.met b/filter/qa/cppunit/data/met/fail/crash-1.met
new file mode 100644
index 0000000..c46b4a9
Binary files /dev/null and b/filter/qa/cppunit/data/met/fail/crash-1.met differ
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index f59567b..0120a90 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -208,7 +208,7 @@ enum PenStyle { PEN_NULL, PEN_SOLID, PEN_DOT, PEN_DASH, PEN_DASHDOT };
struct OSPalette {
OSPalette * pSucc;
sal_uInt32 * p0RGB; // May be NULL!
- sal_uInt16 nSize;
+ size_t nSize;
};
struct OSArea {
@@ -733,12 +733,13 @@ void OS2METReader::SetPalette0RGB(sal_uInt16 nIndex, sal_uLong nCol)
}
if (pPaletteStack->p0RGB==NULL || nIndex>=pPaletteStack->nSize) {
sal_uInt32 * pOld0RGB=pPaletteStack->p0RGB;
- sal_uInt16 i,nOldSize=pPaletteStack->nSize;
+ size_t nOldSize = pPaletteStack->nSize;
if (pOld0RGB==NULL) nOldSize=0;
pPaletteStack->nSize=2*(nIndex+1);
if (pPaletteStack->nSize<256) pPaletteStack->nSize=256;
pPaletteStack->p0RGB = new sal_uInt32[pPaletteStack->nSize];
- for (i=0; i<pPaletteStack->nSize; i++) {
+ for (size_t i=0; i < pPaletteStack->nSize; ++i)
+ {
if (i<nOldSize) pPaletteStack->p0RGB[i]=pOld0RGB[i];
else if (i==0) pPaletteStack->p0RGB[i]=0x00ffffff;
else pPaletteStack->p0RGB[i]=0;
More information about the Libreoffice-commits
mailing list