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:
Neil Roberts
2026-10-07 19:15:15 +02:00
parent e6176fc4f0
commit 05baa27681
+1 -1
View File
@@ -33,7 +33,7 @@ namespace DOM
// perhaps it would be helpful to know what the implementation should
// do to answer this question...
static rtl::Reference<CDOMImplementation> xDOMImplementation = new CDOMImplementation;
return &*xDOMImplementation;
return xDOMImplementation.get();
}
// there is just 1 static instance, so these must not delete it!