Function swapFromLocalAssetIfNeededForExactOut: If _amount is 0 then no need to perform any other step in swapFromLocalAssetIfNeededForExactOut function
if (_amount == 0) {
return (true, _amount, _asset);
}
The first optimisation doesn't seem to be possible because this code path is not hit unless _amount != 0. See its use in _reconcileProcessPortal for context on why.
https://github.com/code-423n4/2022-06-connext/blob/main/contracts/contracts/core/connext/libraries/AssetLogic.sol#L226
Function swapFromLocalAssetIfNeededForExactOut: If _amount is 0 then no need to perform any other step in swapFromLocalAssetIfNeededForExactOut function
https://github.com/code-423n4/2022-06-connext/blob/main/contracts/contracts/core/shared/ProposedOwnable.sol#L161
_setOwner: This function can be defined as private instead of internal