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:
Mike Kaganski 2021-12-18 12:05:08 +01:00
parent ce827c541d
commit 6e37b34087
2 changed files with 19 additions and 19 deletions

View file

@ -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 )

View file

@ -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