sal/rtl/strtmpl.cxx | 28 ++++++++++++++++------------ sal/rtl/ustring.cxx | 2 +- 2 files changed, 17 insertions(+), 13 deletions(-)
New commits: commit 92bface85dc413fc015fd651c538f580ae2da151 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Mar 2 16:37:55 2015 +0100 Turn function-like macro into true function Change-Id: I70330b1f4844f33779f814377afaf90e0a219b1d diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx index 71052bc..4a90c2e 100644 --- a/sal/rtl/strtmpl.cxx +++ b/sal/rtl/strtmpl.cxx @@ -1191,10 +1191,14 @@ static IMPL_RTL_STRCODE* IMPL_RTL_STRINGNAME( ImplNewCopy )( IMPL_RTL_STRINGDATA /* String-Class functions */ /* ======================================================================= */ -#define IMPL_RTL_ACQUIRE( pThis ) \ -{ \ - if (!SAL_STRING_IS_STATIC (pThis)) \ - osl_atomic_increment( &((pThis)->refCount) ); \ +namespace { + +void IMPL_RTL_ACQUIRE(IMPL_RTL_STRINGDATA * pThis) +{ + if (!SAL_STRING_IS_STATIC (pThis)) + osl_atomic_increment( &((pThis)->refCount) ); +} + } /* ----------------------------------------------------------------------- */ commit e8eec3b3979cf0626bd88db857879fd57fe7a39c Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Mar 2 16:36:23 2015 +0100 typo Change-Id: Ifc03631b126ec19cb98cb42a258ca4880e868385 diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx index bfd61de..71052bc 100644 --- a/sal/rtl/strtmpl.cxx +++ b/sal/rtl/strtmpl.cxx @@ -1191,7 +1191,7 @@ static IMPL_RTL_STRCODE* IMPL_RTL_STRINGNAME( ImplNewCopy )( IMPL_RTL_STRINGDATA /* String-Class functions */ /* ======================================================================= */ -#define IMPL_RTL_AQUIRE( pThis ) \ +#define IMPL_RTL_ACQUIRE( pThis ) \ { \ if (!SAL_STRING_IS_STATIC (pThis)) \ osl_atomic_increment( &((pThis)->refCount) ); \ @@ -1202,7 +1202,7 @@ static IMPL_RTL_STRCODE* IMPL_RTL_STRINGNAME( ImplNewCopy )( IMPL_RTL_STRINGDATA void SAL_CALL IMPL_RTL_STRINGNAME( acquire )( IMPL_RTL_STRINGDATA* pThis ) SAL_THROW_EXTERN_C() { - IMPL_RTL_AQUIRE( pThis ); + IMPL_RTL_ACQUIRE( pThis ); } /* ----------------------------------------------------------------------- */ @@ -1451,7 +1451,7 @@ void SAL_CALL IMPL_RTL_STRINGNAME( assign )( IMPL_RTL_STRINGDATA** ppThis, { assert(ppThis); /* must be done at first, if pStr == *ppThis */ - IMPL_RTL_AQUIRE( pStr ); + IMPL_RTL_ACQUIRE( pStr ); if ( *ppThis ) IMPL_RTL_STRINGNAME( release )( *ppThis ); @@ -1491,12 +1491,12 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newConcat )( IMPL_RTL_STRINGDATA** ppThis, if ( !pRight || !pRight->length ) { *ppThis = pLeft; - IMPL_RTL_AQUIRE( pLeft ); + IMPL_RTL_ACQUIRE( pLeft ); } else if ( !pLeft || !pLeft->length ) { *ppThis = pRight; - IMPL_RTL_AQUIRE( pRight ); + IMPL_RTL_ACQUIRE( pRight ); } else { @@ -1670,7 +1670,7 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newReplace )( IMPL_RTL_STRINGDATA** ppThis, if ( !bChanged ) { *ppThis = pStr; - IMPL_RTL_AQUIRE( pStr ); + IMPL_RTL_ACQUIRE( pStr ); } RTL_LOG_STRING_NEW( *ppThis ); @@ -1728,7 +1728,7 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newToAsciiLowerCase )( IMPL_RTL_STRINGDATA** if ( !bChanged ) { *ppThis = pStr; - IMPL_RTL_AQUIRE( pStr ); + IMPL_RTL_ACQUIRE( pStr ); } RTL_LOG_STRING_NEW( *ppThis ); @@ -1786,7 +1786,7 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newToAsciiUpperCase )( IMPL_RTL_STRINGDATA** if ( !bChanged ) { *ppThis = pStr; - IMPL_RTL_AQUIRE( pStr ); + IMPL_RTL_ACQUIRE( pStr ); } RTL_LOG_STRING_NEW( *ppThis ); @@ -1822,7 +1822,7 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newTrim )( IMPL_RTL_STRINGDATA** ppThis, if ( !nPreSpaces && !nPostSpaces ) { *ppThis = pStr; - IMPL_RTL_AQUIRE( pStr ); + IMPL_RTL_ACQUIRE( pStr ); } else { diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx index cc99812..d91aaad 100644 --- a/sal/rtl/ustring.cxx +++ b/sal/rtl/ustring.cxx @@ -893,7 +893,7 @@ void SAL_CALL rtl_uString_intern( rtl_uString ** newStr, assert(str); if (SAL_STRING_IS_INTERN(str)) { - IMPL_RTL_AQUIRE( str ); + IMPL_RTL_ACQUIRE( str ); *newStr = str; } else _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits