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:
Sameer Agarwal
2014-12-17 07:35:09 -08:00
parent 257f6dae46
commit bcc865f81c
152 changed files with 751 additions and 526 deletions
@@ -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] = &parameters_copy[0];
for (int block = 1; block < block_sizes.size(); ++block) {
parameters_references_copy[block] = parameters_references_copy[block - 1]