Frank Schönheit - Sun Microsystems Germany wrote:
Hi Stephan,
I'm more for optimizing
Reference< X > ( Reference< X >, UNO_QUERY_THROW )
to just check and throw and not calling queryinterface.
As I already wrote, at least for XInterface that is not easily done:
"If the original UNO design would have used something other than
'query(XInterface) == query(XInterface)' for object identity check, we
could improve performance of the Reference<T>(Reference<T> const &,
UNO_QUERY_THROW) by special-casing it."
I don't get you here. In
Reference< XFoo >( Reference< XBar >, UNO_QUERY_THROW );
if XFoo were XInterface, then the UNO_QUERY_THROW variant would
certainly not be used for identity check, would it?
How do you know? I can very well imagine that someone wrote
Reference<XInterface>(a, UNO_QUERY_THROW) ==
Reference<XInterface>(b, UNO_QUERY_THROW)
to identity-check a and b. In any case, having
Reference<T>(x,UNO_QUERY) behave slightly different than
Reference<T>(x,UNO_QUERY_THROW) here would IMO be a bad idea.
-Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]