mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Remove using namespace std;
For historical reasons we had a "using namespace std;" in port.h. This is generally a bad idea. So removing it and along the way doing a bunch of cpplint cleanup. Change-Id: Ia125601a55ae62695e247fb0250df4c6f86c46c6
This commit is contained in:
@@ -104,7 +104,7 @@ class DynamicNumericDiffCostFunction : public CostFunction {
|
||||
<< "You must call DynamicNumericDiffCostFunction::SetNumResiduals() "
|
||||
<< "before DynamicNumericDiffCostFunction::Evaluate().";
|
||||
|
||||
const vector<int32>& block_sizes = parameter_block_sizes();
|
||||
const std::vector<int32>& block_sizes = parameter_block_sizes();
|
||||
CHECK(!block_sizes.empty())
|
||||
<< "You must call DynamicNumericDiffCostFunction::AddParameterBlock() "
|
||||
<< "before DynamicNumericDiffCostFunction::Evaluate().";
|
||||
@@ -116,8 +116,8 @@ class DynamicNumericDiffCostFunction : public CostFunction {
|
||||
|
||||
// Create local space for a copy of the parameters which will get mutated.
|
||||
int parameters_size = accumulate(block_sizes.begin(), block_sizes.end(), 0);
|
||||
vector<double> parameters_copy(parameters_size);
|
||||
vector<double*> parameters_references_copy(block_sizes.size());
|
||||
std::vector<double> parameters_copy(parameters_size);
|
||||
std::vector<double*> parameters_references_copy(block_sizes.size());
|
||||
parameters_references_copy[0] = ¶meters_copy[0];
|
||||
for (int block = 1; block < block_sizes.size(); ++block) {
|
||||
parameters_references_copy[block] = parameters_references_copy[block - 1]
|
||||
|
||||
Reference in New Issue
Block a user