Inline the function as it is only used in a single place and does not do anything complicated. This also lets the `operator==` of `std::optional` take care of the proper comparison instead of defaulting the value to -1 and comparing that. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>