FormulaCompiler: Use boost::intrusive_ptr::get() instead of &*

Using &* can be problematic if the pointer is null. In this case it
probably doesn’t matter, but using get() is probably easier to
understand anyway. This also paves the way for a later compiler plugin
to check for this.

Change-Id: I0ba29f530c648782d7d6af8225a2eb6d5c28b5b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211844
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
This commit is contained in:
Neil Roberts
2026-10-07 19:15:27 +02:00
parent 05baa27681
commit d886defd9b
+2 -2
View File
@@ -2535,7 +2535,7 @@ void FormulaCompiler::CallLine()
pArgArray[nArgCount - 1] = mpCode - 1; // Add rest of the arguments
}
if (bDoIICompute)
HandleIIOpCode(&*pOpToken, pArgArray,
HandleIIOpCode(pOpToken.get(), pArgArray,
std::min(nArgCount, static_cast<sal_uInt32>(FORMULA_MAXPARAMSII)));
}
bool bDone = false;
@@ -2554,7 +2554,7 @@ void FormulaCompiler::CallLine()
nArgCount++;
// Jumps are just normal functions for the FunctionAutoPilot tree view
if (!mbJumpCommandReorder && pOpToken->GetType() == svJump)
pOpToken = new FormulaFAPToken( pOpToken->GetOpCode(), nArgCount, &*pOpToken );
pOpToken = new FormulaFAPToken( pOpToken->GetOpCode(), nArgCount, pOpToken.get() );
else
{
// instead of using ocCall, built-in functions use their own OpCodes, if they are called directly