domimplementation: Use rtl::Reference::get() instead of &*
Using &* can be problematic if the pointer is null. In this case it doesn’t matter, but using Reference::get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: I9c055228f21639ad4005d71a768b335b40eff7e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211843 Tested-by: Jenkins Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
This commit is contained in:
@@ -33,7 +33,7 @@ namespace DOM
|
|||||||
// perhaps it would be helpful to know what the implementation should
|
// perhaps it would be helpful to know what the implementation should
|
||||||
// do to answer this question...
|
// do to answer this question...
|
||||||
static rtl::Reference<CDOMImplementation> xDOMImplementation = new CDOMImplementation;
|
static rtl::Reference<CDOMImplementation> xDOMImplementation = new CDOMImplementation;
|
||||||
return &*xDOMImplementation;
|
return xDOMImplementation.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
// there is just 1 static instance, so these must not delete it!
|
// there is just 1 static instance, so these must not delete it!
|
||||||
|
|||||||
Reference in New Issue
Block a user