Hi Noel,
I was just wondering about a few tweaks we could make to cleanup and perhaps even accelerate the compilation - and I imagine others might have some ideas.
* kill internal_only ?
I was wondering - do we need this:
#define LIBO_INTERNAL_ONLY
anymore, since our APIs are now internal anyway; might be worth a clean.
* out-line the OUString methods as C++ methods:
I suspect that (at least for non PCH builds), that rtl/oustring.hxx and rtl/ostring.hxx would be better using their functional call indirection as a C++ function call rather than compiling and inlining this C method call and then taking the indirection there all over the place.
Now we have removed the C++ ABI guarantees and map files this might be a nice cleanup, clearly simple stuff:
Like this should stay inline (?):
constexpr
OUString()
{
pData = const_cast<rtl_uString *>(&empty.str);
}
But other bits like:
explicit OUString( sal_Unicode value )
: pData (NULL)
{
rtl_uString_newFromStr_WithLength( &pData, &value, 1 );
}
Seem to only slow down our compilation
assuming that we can have the rtl_uString_newFromStr_WithLength really in-line with OUString::OUString(sal_Unicode value) that is.
Then again some things like:
bool equalsIgnoreAsciiCaseAsciiL( const char * asciiStr, sal_Int32 asciiStrLength ) const
{
if ( pData->length != asciiStrLength )
return false;
return rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength( pData->buffer, pData->length, asciiStr ) == 0;
}
Are prolly performance critical to inline.
* cplusplus bits in osl headers:
We still seem to have hybrid headers here:
include/osl/time.h
#if defined __cplusplus
struct TimeValue {
...
Which - I wonder ... is that necessary anymore ?
Anyhow - would be good to get Stephan's view, perhaps in the TC meeting or here.
ATB,
Michael.