summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-14 12:44:47 +0200
committerNoel Grandin <noel@peralex.com>2015-04-15 11:47:12 +0200
commit71b809959bb8f775d83dc52628448bb8b8322b28 (patch)
treef9aa4308050eb7d55611068602c0cf0e3c1b3690 /cppu
parent135907f2061550624ee1859745d94eee01849070 (diff)
remove unnecessary use of void in function declarations
ie. void f(void); becomes void f(); I used the following command to make the changes: git grep -lP '\(\s*void\s*\)' -- *.cxx \ | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;' and ran it for both .cxx and .hxx files. Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
Diffstat (limited to 'cppu')
-rw-r--r--cppu/source/AffineBridge/AffineBridge.cxx30
-rw-r--r--cppu/source/LogBridge/LogBridge.cxx16
-rw-r--r--cppu/source/UnsafeBridge/UnsafeBridge.cxx18
-rw-r--r--cppu/source/helper/purpenv/Proxy.hxx6
-rw-r--r--cppu/source/helper/purpenv/helper_purpenv_Environment.cxx24
-rw-r--r--cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx10
-rw-r--r--cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx8
-rw-r--r--cppu/source/typelib/static_types.cxx6
-rw-r--r--cppu/source/typelib/typelib.cxx4
-rw-r--r--cppu/source/uno/EnvStack.cxx2
-rw-r--r--cppu/source/uno/cascade_mapping.cxx8
11 files changed, 66 insertions, 66 deletions
diff --git a/cppu/source/AffineBridge/AffineBridge.cxx b/cppu/source/AffineBridge/AffineBridge.cxx
index c340282d1ae7..2184a59461a1 100644
--- a/cppu/source/AffineBridge/AffineBridge.cxx
+++ b/cppu/source/AffineBridge/AffineBridge.cxx
@@ -68,24 +68,24 @@ public:
osl::Condition m_outerCondition;
OuterThread * m_pOuterThread;
- explicit AffineBridge(void);
- virtual ~AffineBridge(void);
+ explicit AffineBridge();
+ virtual ~AffineBridge();
virtual void v_callInto_v(uno_EnvCallee * pCallee, va_list * pParam) SAL_OVERRIDE;
virtual void v_callOut_v (uno_EnvCallee * pCallee, va_list * pParam) SAL_OVERRIDE;
- virtual void v_enter(void) SAL_OVERRIDE;
- virtual void v_leave(void) SAL_OVERRIDE;
+ virtual void v_enter() SAL_OVERRIDE;
+ virtual void v_leave() SAL_OVERRIDE;
virtual bool v_isValid(rtl::OUString * pReason) SAL_OVERRIDE;
- void innerDispatch(void);
+ void innerDispatch();
void outerDispatch(int loop);
};
class InnerThread : public osl::Thread
{
- virtual void SAL_CALL run(void) SAL_OVERRIDE;
+ virtual void SAL_CALL run() SAL_OVERRIDE;
AffineBridge * m_pAffineBridge;
@@ -97,7 +97,7 @@ public:
}
};
-void InnerThread::run(void)
+void InnerThread::run()
{
osl_setThreadName("UNO AffineBridge InnerThread");
@@ -108,7 +108,7 @@ void InnerThread::run(void)
class OuterThread : public osl::Thread
{
- virtual void SAL_CALL run(void) SAL_OVERRIDE;
+ virtual void SAL_CALL run() SAL_OVERRIDE;
AffineBridge * m_pAffineBridge;
@@ -122,7 +122,7 @@ OuterThread::OuterThread(AffineBridge * threadEnvironment)
create();
}
-void OuterThread::run(void)
+void OuterThread::run()
{
osl_setThreadName("UNO AffineBridge OuterThread");
@@ -137,7 +137,7 @@ void OuterThread::run(void)
}
-AffineBridge::AffineBridge(void)
+AffineBridge::AffineBridge()
: m_message (CB_DONE),
m_pCallee (0),
m_pParam (0),
@@ -150,9 +150,9 @@ AffineBridge::AffineBridge(void)
LOG_LIFECYCLE_AffineBridge_emit(fprintf(stderr, "LIFE: %s -> %p\n", "AffineBridge::AffineBridge(uno_Environment * pEnv)", this));
}
-AffineBridge::~AffineBridge(void)
+AffineBridge::~AffineBridge()
{
- LOG_LIFECYCLE_AffineBridge_emit(fprintf(stderr, "LIFE: %s -> %p\n", "AffineBridge::~AffineBridge(void)", this));
+ LOG_LIFECYCLE_AffineBridge_emit(fprintf(stderr, "LIFE: %s -> %p\n", "AffineBridge::~AffineBridge()", this));
if (m_pInnerThread && osl::Thread::getCurrentIdentifier() != m_innerThreadId)
{
@@ -211,7 +211,7 @@ void AffineBridge::outerDispatch(int loop)
while(mm != CB_DONE && loop);
}
-void AffineBridge::innerDispatch(void)
+void AffineBridge::innerDispatch()
{
OSL_ASSERT(m_innerThreadId == osl::Thread::getCurrentIdentifier());
OSL_ASSERT(m_innerThreadId != m_outerThreadId);
@@ -303,7 +303,7 @@ void AffineBridge::v_callOut_v(uno_EnvCallee * pCallee, va_list * pParam)
innerDispatch();
}
-void AffineBridge::v_enter(void)
+void AffineBridge::v_enter()
{
m_innerMutex.acquire();
@@ -315,7 +315,7 @@ void AffineBridge::v_enter(void)
++ m_enterCount;
}
-void AffineBridge::v_leave(void)
+void AffineBridge::v_leave()
{
OSL_ASSERT(m_innerThreadId == osl::Thread::getCurrentIdentifier());
diff --git a/cppu/source/LogBridge/LogBridge.cxx b/cppu/source/LogBridge/LogBridge.cxx
index 30cde7fee365..2948d9bf32d8 100644
--- a/cppu/source/LogBridge/LogBridge.cxx
+++ b/cppu/source/LogBridge/LogBridge.cxx
@@ -39,27 +39,27 @@ class LogBridge : public cppu::Enterable
sal_Int32 m_count;
oslThreadIdentifier m_threadId;
- virtual ~LogBridge(void);
+ virtual ~LogBridge();
public:
- explicit LogBridge(void);
+ explicit LogBridge();
virtual void v_callInto_v(uno_EnvCallee * pCallee, va_list * pParam) SAL_OVERRIDE;
virtual void v_callOut_v (uno_EnvCallee * pCallee, va_list * pParam) SAL_OVERRIDE;
- virtual void v_enter(void) SAL_OVERRIDE;
- virtual void v_leave(void) SAL_OVERRIDE;
+ virtual void v_enter() SAL_OVERRIDE;
+ virtual void v_leave() SAL_OVERRIDE;
virtual bool v_isValid(rtl::OUString * pReason) SAL_OVERRIDE;
};
-LogBridge::LogBridge(void)
+LogBridge::LogBridge()
: m_count (0)
,m_threadId(0)
{
}
-LogBridge::~LogBridge(void)
+LogBridge::~LogBridge()
{
OSL_ASSERT(m_count >= 0);
}
@@ -83,7 +83,7 @@ void LogBridge::v_callOut_v(uno_EnvCallee * pCallee, va_list * pParam)
m_threadId = osl::Thread::getCurrentIdentifier();
}
-void LogBridge::v_enter(void)
+void LogBridge::v_enter()
{
m_mutex.acquire();
@@ -95,7 +95,7 @@ void LogBridge::v_enter(void)
++ m_count;
}
-void LogBridge::v_leave(void)
+void LogBridge::v_leave()
{
OSL_ASSERT(m_count > 0);
diff --git a/cppu/source/UnsafeBridge/UnsafeBridge.cxx b/cppu/source/UnsafeBridge/UnsafeBridge.cxx
index b51f17836ff0..533ff93b372c 100644
--- a/cppu/source/UnsafeBridge/UnsafeBridge.cxx
+++ b/cppu/source/UnsafeBridge/UnsafeBridge.cxx
@@ -47,30 +47,30 @@ class UnsafeBridge : public cppu::Enterable
sal_Int32 m_count;
oslThreadIdentifier m_threadId;
- virtual ~UnsafeBridge(void);
+ virtual ~UnsafeBridge();
public:
- explicit UnsafeBridge(void);
+ explicit UnsafeBridge();
virtual void v_callInto_v(uno_EnvCallee * pCallee, va_list * pParam) SAL_OVERRIDE;
virtual void v_callOut_v (uno_EnvCallee * pCallee, va_list * pParam) SAL_OVERRIDE;
- virtual void v_enter(void) SAL_OVERRIDE;
- virtual void v_leave(void) SAL_OVERRIDE;
+ virtual void v_enter() SAL_OVERRIDE;
+ virtual void v_leave() SAL_OVERRIDE;
virtual bool v_isValid(rtl::OUString * pReason) SAL_OVERRIDE;
};
-UnsafeBridge::UnsafeBridge(void)
+UnsafeBridge::UnsafeBridge()
: m_count (0),
m_threadId(0)
{
LOG_LIFECYCLE_UnsafeBridge_emit(fprintf(stderr, "LIFE: %s -> %p\n", "UnsafeBridge::UnsafeBridge(uno_Environment * pEnv)", this));
}
-UnsafeBridge::~UnsafeBridge(void)
+UnsafeBridge::~UnsafeBridge()
{
- LOG_LIFECYCLE_UnsafeBridge_emit(fprintf(stderr, "LIFE: %s -> %p\n", "UnsafeBridge::~UnsafeBridge(void)", this));
+ LOG_LIFECYCLE_UnsafeBridge_emit(fprintf(stderr, "LIFE: %s -> %p\n", "UnsafeBridge::~UnsafeBridge()", this));
SAL_WARN_IF(m_count < 0, "cppu.unsafebridge", "m_count is less than 0");
}
@@ -94,7 +94,7 @@ void UnsafeBridge::v_callOut_v(uno_EnvCallee * pCallee, va_list * pParam)
m_threadId = osl::Thread::getCurrentIdentifier();
}
-void UnsafeBridge::v_enter(void)
+void UnsafeBridge::v_enter()
{
m_mutex.acquire();
@@ -106,7 +106,7 @@ void UnsafeBridge::v_enter(void)
++ m_count;
}
-void UnsafeBridge::v_leave(void)
+void UnsafeBridge::v_leave()
{
SAL_WARN_IF(m_count <= 0, "cppu.unsafebridge", "m_count is less than or equal to 0");
diff --git a/cppu/source/helper/purpenv/Proxy.hxx b/cppu/source/helper/purpenv/Proxy.hxx
index 2b69faaeb9c6..037c68e8dc05 100644
--- a/cppu/source/helper/purpenv/Proxy.hxx
+++ b/cppu/source/helper/purpenv/Proxy.hxx
@@ -56,10 +56,10 @@ public:
rtl::OUString const & rOId,
cppu::helper::purpenv::ProbeFun * probeFun,
void * pProbeContext);
- ~Proxy(void);
+ ~Proxy();
- void acquire(void);
- void release(void);
+ void acquire();
+ void release();
void dispatch(
typelib_TypeDescriptionReference * pReturnTypeRef,
diff --git a/cppu/source/helper/purpenv/helper_purpenv_Environment.cxx b/cppu/source/helper/purpenv/helper_purpenv_Environment.cxx
index d3b47bfee7f0..f6dc421b4db6 100644
--- a/cppu/source/helper/purpenv/helper_purpenv_Environment.cxx
+++ b/cppu/source/helper/purpenv/helper_purpenv_Environment.cxx
@@ -76,11 +76,11 @@ class Base : public cppu::Enterable
public:
explicit Base(uno_Environment * pEnv, cppu::Enterable * pEnterable);
- void acquireWeak(void);
- void releaseWeak(void);
+ void acquireWeak();
+ void releaseWeak();
void harden (uno_Environment ** ppHardEnv);
- void acquire (void);
- void release (void);
+ void acquire();
+ void release();
void registerProxyInterface (void ** ppProxy,
uno_freeProxyFunc freeProxy,
@@ -100,8 +100,8 @@ public:
void acquireInterface (void * pInterface);
void releaseInterface (void * pInterface);
- virtual void v_enter (void) SAL_OVERRIDE;
- virtual void v_leave (void) SAL_OVERRIDE;
+ virtual void v_enter() SAL_OVERRIDE;
+ virtual void v_leave() SAL_OVERRIDE;
virtual void v_callInto_v(uno_EnvCallee * pCallee, va_list * pParam) SAL_OVERRIDE;
virtual void v_callOut_v (uno_EnvCallee * pCallee, va_list * pParam) SAL_OVERRIDE;
virtual bool v_isValid (rtl::OUString * pReason) SAL_OVERRIDE;
@@ -281,14 +281,14 @@ Base::~Base()
m_pEnv->release(m_pEnv);
}
-void Base::acquire(void)
+void Base::acquire()
{
m_env_acquire(m_pEnv);
osl_atomic_increment(&m_nRef);
}
-void Base::release(void)
+void Base::release()
{
if (osl_atomic_decrement(&m_nRef) == 0)
delete this;
@@ -303,12 +303,12 @@ void Base::harden(uno_Environment ** ppHardEnv)
osl_atomic_increment(&m_nRef);
}
-void Base::acquireWeak(void)
+void Base::acquireWeak()
{
m_env_acquireWeak(m_pEnv);
}
-void Base::releaseWeak(void)
+void Base::releaseWeak()
{
m_env_releaseWeak(m_pEnv);
}
@@ -493,12 +493,12 @@ void Base::releaseInterface(void * pInterface)
m_env_releaseInterface);
}
-void Base::v_enter(void)
+void Base::v_enter()
{
m_pEnterable->enter();
}
-void Base::v_leave(void)
+void Base::v_leave()
{
m_pEnterable->leave();
}
diff --git a/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx b/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx
index 5e03243df2ae..250ad9dede94 100644
--- a/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx
+++ b/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx
@@ -60,15 +60,15 @@ public:
uno_Environment * pTo,
cppu::helper::purpenv::ProbeFun * probeFun,
void * pProbeContext);
- virtual ~Mapping(void);
+ virtual ~Mapping();
void mapInterface(
uno_Interface ** ppOut,
uno_Interface * pUnoI,
typelib_InterfaceTypeDescription * pTypeDescr);
- void acquire(void);
- void release(void);
+ void acquire();
+ void release();
};
static void SAL_CALL s_mapInterface(
@@ -135,9 +135,9 @@ Mapping::Mapping(uno_Environment * pFrom,
uno_Mapping::mapInterface = (uno_MapInterfaceFunc)s_mapInterface;
}
-Mapping::~Mapping(void)
+Mapping::~Mapping()
{
- LOG_LIFECYCLE_cppu_helper_purpenv_Mapping_emit(fprintf(stderr, "LIFE: %s -> %p\n", "Mapping::~Mapping(void)", this));
+ LOG_LIFECYCLE_cppu_helper_purpenv_Mapping_emit(fprintf(stderr, "LIFE: %s -> %p\n", "Mapping::~Mapping()", this));
}
diff --git a/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx b/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx
index f73a3228ed5b..e366b9478d58 100644
--- a/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx
+++ b/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx
@@ -255,7 +255,7 @@ Proxy::~Proxy()
typelib_typedescription_release(&m_pTypeDescr->aBase);
}
-static uno::TypeDescription getAcquireMethod(void)
+static uno::TypeDescription getAcquireMethod()
{
typelib_TypeDescriptionReference * type_XInterface =
* typelib_static_type_getByTypeClass(typelib_TypeClass_INTERFACE);
@@ -270,7 +270,7 @@ static uno::TypeDescription getAcquireMethod(void)
return acquire;
}
-static uno::TypeDescription getReleaseMethod(void)
+static uno::TypeDescription getReleaseMethod()
{
typelib_TypeDescriptionReference * type_XInterface =
* typelib_static_type_getByTypeClass(typelib_TypeClass_INTERFACE);
@@ -288,7 +288,7 @@ static uno::TypeDescription getReleaseMethod(void)
static uno::TypeDescription s_acquireMethod(getAcquireMethod());
static uno::TypeDescription s_releaseMethod(getReleaseMethod());
-void Proxy::acquire(void)
+void Proxy::acquire()
{
if (m_probeFun)
m_probeFun(true,
@@ -328,7 +328,7 @@ void Proxy::acquire(void)
}
-void Proxy::release(void)
+void Proxy::release()
{
cppu::helper::purpenv::ProbeFun * probeFun = m_probeFun;
void * pProbeContext = m_pProbeContext;
diff --git a/cppu/source/typelib/static_types.cxx b/cppu/source/typelib/static_types.cxx
index e5227553e97a..446671afd09a 100644
--- a/cppu/source/typelib/static_types.cxx
+++ b/cppu/source/typelib/static_types.cxx
@@ -398,7 +398,7 @@ void init(
typelib_TypeDescription * pReg = &pComp->aBase;
pReg->pWeakRef = reinterpret_cast<typelib_TypeDescriptionReference *>(pReg);
- // sizeof( void ) not allowed
+ // sizeof(void) not allowed
pReg->nSize = ::typelib_typedescription_getAlignedUnoSize( pReg, 0, pReg->nAlignment );
pReg->nAlignment = adjustAlignment( pReg->nAlignment );
pReg->bComplete = sal_False;
@@ -495,7 +495,7 @@ void SAL_CALL typelib_static_mi_interface_type_init(
typelib_TypeDescription * pReg = &pIface->aBase;
pReg->pWeakRef = reinterpret_cast<typelib_TypeDescriptionReference *>(pReg);
- // sizeof( void ) not allowed
+ // sizeof(void) not allowed
pReg->nSize = ::typelib_typedescription_getAlignedUnoSize( pReg, 0, pReg->nAlignment );
pReg->nAlignment = adjustAlignment( pReg->nAlignment );
@@ -536,7 +536,7 @@ void SAL_CALL typelib_static_enum_type_init(
pEnum->nDefaultEnumValue = nDefaultValue;
pReg->pWeakRef = reinterpret_cast<typelib_TypeDescriptionReference *>(pReg);
- // sizeof( void ) not allowed
+ // sizeof(void) not allowed
pReg->nSize = ::typelib_typedescription_getAlignedUnoSize( pReg, 0, pReg->nAlignment );
pReg->nAlignment = ::adjustAlignment( pReg->nAlignment );
pReg->bComplete = sal_False;
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index 4ae195745b41..c69fd8f0e790 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -826,7 +826,7 @@ void newTypeDescription(
(*ppRet)->pWeakRef = reinterpret_cast<typelib_TypeDescriptionReference *>(*ppRet);
if( eTypeClass != typelib_TypeClass_VOID )
{
- // sizeof( void ) not allowed
+ // sizeof(void) not allowed
(*ppRet)->nSize = typelib_typedescription_getAlignedUnoSize( (*ppRet), 0, (*ppRet)->nAlignment );
(*ppRet)->nAlignment = adjustAlignment( (*ppRet)->nAlignment );
}
@@ -884,7 +884,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEnum(
::memcpy( pEnum->pEnumValues, pEnumValues, nEnumValues * sizeof(sal_Int32) );
(*ppRet)->pWeakRef = reinterpret_cast<typelib_TypeDescriptionReference *>(*ppRet);
- // sizeof( void ) not allowed
+ // sizeof(void) not allowed
(*ppRet)->nSize = typelib_typedescription_getAlignedUnoSize( (*ppRet), 0, (*ppRet)->nAlignment );
(*ppRet)->nAlignment = adjustAlignment( (*ppRet)->nAlignment );
}
diff --git a/cppu/source/uno/EnvStack.cxx b/cppu/source/uno/EnvStack.cxx
index 1bb726685348..5fefaa85640a 100644
--- a/cppu/source/uno/EnvStack.cxx
+++ b/cppu/source/uno/EnvStack.cxx
@@ -86,7 +86,7 @@ static void s_setCurrent(uno_Environment * pEnv)
}
}
-static uno_Environment * s_getCurrent(void)
+static uno_Environment * s_getCurrent()
{
uno_Environment * pEnv = NULL;
diff --git a/cppu/source/uno/cascade_mapping.cxx b/cppu/source/uno/cascade_mapping.cxx
index 1402be535454..596205a6be4e 100644
--- a/cppu/source/uno/cascade_mapping.cxx
+++ b/cppu/source/uno/cascade_mapping.cxx
@@ -52,8 +52,8 @@ class MediatorMapping : public uno_Mapping
uno::Environment m_to;
public:
- void acquire(void);
- void release(void);
+ void acquire();
+ void release();
void mapInterface(void ** ppOut,
void * pInterface,
@@ -113,14 +113,14 @@ MediatorMapping::~MediatorMapping()
LOG_LIFECYLE_MediatorMapping_emit(std::cerr << __FUNCTION__ << std::endl);
}
-void MediatorMapping::acquire(void)
+void MediatorMapping::acquire()
{
LOG_LIFECYLE_MediatorMapping_emit(std::cerr << __FUNCTION__ << std::endl);
osl_atomic_increment(&m_refCount);
}
-void MediatorMapping::release(void)
+void MediatorMapping::release()
{
LOG_LIFECYLE_MediatorMapping_emit(std::cerr << __FUNCTION__ << std::endl);