diff options
Diffstat (limited to 'extern/ceres/internal/ceres/residual_block.h')
-rw-r--r-- | extern/ceres/internal/ceres/residual_block.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/extern/ceres/internal/ceres/residual_block.h b/extern/ceres/internal/ceres/residual_block.h index a32f1c36cd3..a2e4425b911 100644 --- a/extern/ceres/internal/ceres/residual_block.h +++ b/extern/ceres/internal/ceres/residual_block.h @@ -34,12 +34,13 @@ #ifndef CERES_INTERNAL_RESIDUAL_BLOCK_H_ #define CERES_INTERNAL_RESIDUAL_BLOCK_H_ +#include <cstdint> +#include <memory> #include <string> #include <vector> #include "ceres/cost_function.h" #include "ceres/internal/port.h" -#include "ceres/internal/scoped_ptr.h" #include "ceres/stringprintf.h" #include "ceres/types.h" @@ -81,12 +82,14 @@ class ResidualBlock { // computed. If jacobians[i] is NULL, then the jacobian for that parameter is // not computed. // + // cost must not be null. + // // Evaluate needs scratch space which must be supplied by the caller via // scratch. The array should have at least NumScratchDoublesForEvaluate() // space available. // // The return value indicates the success or failure. If the function returns - // false, the caller should expect the the output memory locations to have + // false, the caller should expect the output memory locations to have // been modified. // // The returned cost and jacobians have had robustification and local @@ -134,12 +137,12 @@ class ResidualBlock { private: const CostFunction* cost_function_; const LossFunction* loss_function_; - scoped_array<ParameterBlock*> parameter_blocks_; + std::unique_ptr<ParameterBlock*[]> parameter_blocks_; // The index of the residual, typically in a Program. This is only to permit // switching from a ResidualBlock* to an index in the Program's array, needed // to do efficient removals. - int32 index_; + int32_t index_; }; } // namespace internal |