Move ULONGGuard where it's used
Change-Id: I2b440da8cb9b8cc48904f94af0e7468f620dfb21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127047 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
parent
ce827c541d
commit
6e37b34087
2 changed files with 19 additions and 19 deletions
|
@ -27,6 +27,25 @@ namespace inprocserv
|
|||
|
||||
namespace {
|
||||
|
||||
class ULONGGuard
|
||||
{
|
||||
ULONG* m_pValue;
|
||||
|
||||
public:
|
||||
explicit ULONGGuard( ULONG* pValue )
|
||||
: m_pValue( pValue )
|
||||
{
|
||||
if ( m_pValue )
|
||||
(*m_pValue)++;
|
||||
}
|
||||
|
||||
~ULONGGuard()
|
||||
{
|
||||
if ( m_pValue )
|
||||
(*m_pValue)--;
|
||||
}
|
||||
};
|
||||
|
||||
void SetName( LPCOLESTR pszNameFromOutside, wchar_t*& pOwnName )
|
||||
{
|
||||
if ( !pszNameFromOutside )
|
||||
|
|
|
@ -156,25 +156,6 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
class ULONGGuard
|
||||
{
|
||||
ULONG* m_pValue;
|
||||
|
||||
public:
|
||||
explicit ULONGGuard( ULONG* pValue )
|
||||
: m_pValue( pValue )
|
||||
{
|
||||
if ( m_pValue )
|
||||
(*m_pValue)++;
|
||||
}
|
||||
|
||||
~ULONGGuard()
|
||||
{
|
||||
if ( m_pValue )
|
||||
(*m_pValue)--;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace inprocserv
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue