CostFunctionToFunctor allows dynamic number of residuals.

The code itself was perfectly capable of handling residuals, but there
was an overly strict runtime check that had to be removed.

Thanks to Domink Reitzle for reporting this.

Change-Id: I6a6d000a7c5203dd5945a61b4caeda1b8aeb09c9
2 files changed