Added CERES_ prefix to the DISALLOW macros.
Change-Id: Ib81e9112e8bbc6ed6cb52f21825df0f6e659be51
diff --git a/include/ceres/cost_function.h b/include/ceres/cost_function.h
index 84403d9..9b010f7 100644
--- a/include/ceres/cost_function.h
+++ b/include/ceres/cost_function.h
@@ -119,7 +119,7 @@
// number of outputs (residuals).
vector<int16> parameter_block_sizes_;
int num_residuals_;
- DISALLOW_COPY_AND_ASSIGN(CostFunction);
+ CERES_DISALLOW_COPY_AND_ASSIGN(CostFunction);
};
} // namespace ceres
diff --git a/include/ceres/internal/macros.h b/include/ceres/internal/macros.h
index 05d6287..7dd4e3e 100644
--- a/include/ceres/internal/macros.h
+++ b/include/ceres/internal/macros.h
@@ -43,11 +43,13 @@
//
// For disallowing only assign or copy, write the code directly, but declare
// the intend in a comment, for example:
-// void operator=(const TypeName&); // DISALLOW_ASSIGN
-// Note, that most uses of DISALLOW_ASSIGN and DISALLOW_COPY are broken
-// semantically, one should either use disallow both or neither. Try to
-// avoid these in new code.
-#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
+//
+// void operator=(const TypeName&); // _DISALLOW_ASSIGN
+
+// Note, that most uses of CERES_DISALLOW_ASSIGN and CERES_DISALLOW_COPY
+// are broken semantically, one should either use disallow both or
+// neither. Try to avoid these in new code.
+#define CERES_DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&); \
void operator=(const TypeName&)
@@ -57,9 +59,9 @@
// This should be used in the private: declarations for a class
// that wants to prevent anyone from instantiating it. This is
// especially useful for classes containing only static methods.
-#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
+#define CERES_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
TypeName(); \
- DISALLOW_COPY_AND_ASSIGN(TypeName)
+ CERES_DISALLOW_COPY_AND_ASSIGN(TypeName)
// The arraysize(arr) macro returns the # of elements in an array arr.
// The expression is a compile-time constant, and therefore can be
diff --git a/include/ceres/loss_function.h b/include/ceres/loss_function.h
index 81add02..c95a0a0 100644
--- a/include/ceres/loss_function.h
+++ b/include/ceres/loss_function.h
@@ -249,7 +249,7 @@
internal::scoped_ptr<const LossFunction> rho_;
const double a_;
const Ownership ownership_;
- DISALLOW_COPY_AND_ASSIGN(ScaledLoss);
+ CERES_DISALLOW_COPY_AND_ASSIGN(ScaledLoss);
};
// Sometimes after the optimization problem has been constructed, we
@@ -314,7 +314,7 @@
private:
internal::scoped_ptr<const LossFunction> rho_;
Ownership ownership_;
- DISALLOW_COPY_AND_ASSIGN(LossFunctionWrapper);
+ CERES_DISALLOW_COPY_AND_ASSIGN(LossFunctionWrapper);
};
} // namespace ceres
diff --git a/include/ceres/problem.h b/include/ceres/problem.h
index 0ca6100..9710e46 100644
--- a/include/ceres/problem.h
+++ b/include/ceres/problem.h
@@ -257,7 +257,7 @@
private:
friend class internal::SolverImpl;
internal::scoped_ptr<internal::ProblemImpl> problem_impl_;
- DISALLOW_COPY_AND_ASSIGN(Problem);
+ CERES_DISALLOW_COPY_AND_ASSIGN(Problem);
};
} // namespace ceres
diff --git a/internal/ceres/block_random_access_dense_matrix.h b/internal/ceres/block_random_access_dense_matrix.h
index 3a00962..9f27a4c 100644
--- a/internal/ceres/block_random_access_dense_matrix.h
+++ b/internal/ceres/block_random_access_dense_matrix.h
@@ -89,7 +89,7 @@
vector<int> block_layout_;
scoped_array<double> values_;
- DISALLOW_COPY_AND_ASSIGN(BlockRandomAccessDenseMatrix);
+ CERES_DISALLOW_COPY_AND_ASSIGN(BlockRandomAccessDenseMatrix);
};
} // namespace internal
diff --git a/internal/ceres/block_random_access_sparse_matrix.h b/internal/ceres/block_random_access_sparse_matrix.h
index 12613c3..27e30a7 100644
--- a/internal/ceres/block_random_access_sparse_matrix.h
+++ b/internal/ceres/block_random_access_sparse_matrix.h
@@ -100,7 +100,7 @@
// The underlying matrix object which actually stores the cells.
scoped_ptr<TripletSparseMatrix> tsm_;
- DISALLOW_COPY_AND_ASSIGN(BlockRandomAccessSparseMatrix);
+ CERES_DISALLOW_COPY_AND_ASSIGN(BlockRandomAccessSparseMatrix);
};
} // namespace internal
diff --git a/internal/ceres/block_sparse_matrix.h b/internal/ceres/block_sparse_matrix.h
index f71446e..f0be335 100644
--- a/internal/ceres/block_sparse_matrix.h
+++ b/internal/ceres/block_sparse_matrix.h
@@ -74,7 +74,7 @@
virtual const double* RowBlockValues(int row_block_index) const = 0;
private:
- DISALLOW_COPY_AND_ASSIGN(BlockSparseMatrixBase);
+ CERES_DISALLOW_COPY_AND_ASSIGN(BlockSparseMatrixBase);
};
// This class implements the SparseMatrix interface for storing and
@@ -135,7 +135,7 @@
int num_nonzeros_;
scoped_array<double> values_;
scoped_ptr<CompressedRowBlockStructure> block_structure_;
- DISALLOW_COPY_AND_ASSIGN(BlockSparseMatrix);
+ CERES_DISALLOW_COPY_AND_ASSIGN(BlockSparseMatrix);
};
} // namespace internal
diff --git a/internal/ceres/canonical_views_clustering.cc b/internal/ceres/canonical_views_clustering.cc
index 53190ad..5a320d7 100644
--- a/internal/ceres/canonical_views_clustering.cc
+++ b/internal/ceres/canonical_views_clustering.cc
@@ -75,7 +75,7 @@
IntMap view_to_canonical_view_;
// Maps a view to its similarity to its current cluster center.
HashMap<int, double> view_to_canonical_view_similarity_;
- DISALLOW_COPY_AND_ASSIGN(CanonicalViewsClustering);
+ CERES_DISALLOW_COPY_AND_ASSIGN(CanonicalViewsClustering);
};
void ComputeCanonicalViewsClustering(
diff --git a/internal/ceres/cgnr_solver.h b/internal/ceres/cgnr_solver.h
index dd36f99..877b4c4 100644
--- a/internal/ceres/cgnr_solver.h
+++ b/internal/ceres/cgnr_solver.h
@@ -57,7 +57,7 @@
private:
const LinearSolver::Options options_;
scoped_ptr<BlockJacobiPreconditioner> jacobi_preconditioner_;
- DISALLOW_COPY_AND_ASSIGN(CgnrSolver);
+ CERES_DISALLOW_COPY_AND_ASSIGN(CgnrSolver);
};
} // namespace internal
diff --git a/internal/ceres/compressed_row_sparse_matrix.h b/internal/ceres/compressed_row_sparse_matrix.h
index 9a39d28..c44f1db 100644
--- a/internal/ceres/compressed_row_sparse_matrix.h
+++ b/internal/ceres/compressed_row_sparse_matrix.h
@@ -120,7 +120,7 @@
int max_num_nonzeros_;
- DISALLOW_COPY_AND_ASSIGN(CompressedRowSparseMatrix);
+ CERES_DISALLOW_COPY_AND_ASSIGN(CompressedRowSparseMatrix);
};
} // namespace internal
diff --git a/internal/ceres/conjugate_gradients_solver.h b/internal/ceres/conjugate_gradients_solver.h
index 57f99e3..b8dfa56 100644
--- a/internal/ceres/conjugate_gradients_solver.h
+++ b/internal/ceres/conjugate_gradients_solver.h
@@ -65,7 +65,7 @@
private:
const LinearSolver::Options options_;
- DISALLOW_COPY_AND_ASSIGN(ConjugateGradientsSolver);
+ CERES_DISALLOW_COPY_AND_ASSIGN(ConjugateGradientsSolver);
};
} // namespace internal
diff --git a/internal/ceres/dense_qr_solver.h b/internal/ceres/dense_qr_solver.h
index 990c8d4..2e0b283 100644
--- a/internal/ceres/dense_qr_solver.h
+++ b/internal/ceres/dense_qr_solver.h
@@ -90,7 +90,7 @@
double* x);
const LinearSolver::Options options_;
- DISALLOW_COPY_AND_ASSIGN(DenseQRSolver);
+ CERES_DISALLOW_COPY_AND_ASSIGN(DenseQRSolver);
};
} // namespace internal
diff --git a/internal/ceres/graph.h b/internal/ceres/graph.h
index fd7a224..2c0f6d2 100644
--- a/internal/ceres/graph.h
+++ b/internal/ceres/graph.h
@@ -129,7 +129,7 @@
HashMap<Vertex, HashSet<Vertex> > edges_;
HashMap<pair<Vertex, Vertex>, double> edge_weights_;
- DISALLOW_COPY_AND_ASSIGN(Graph);
+ CERES_DISALLOW_COPY_AND_ASSIGN(Graph);
};
} // namespace internal
diff --git a/internal/ceres/problem_impl.h b/internal/ceres/problem_impl.h
index 523860e..2ca0554 100644
--- a/internal/ceres/problem_impl.h
+++ b/internal/ceres/problem_impl.h
@@ -118,7 +118,7 @@
map<double*, ParameterBlock*> parameter_block_map_;
internal::scoped_ptr<internal::Program> program_;
- DISALLOW_COPY_AND_ASSIGN(ProblemImpl);
+ CERES_DISALLOW_COPY_AND_ASSIGN(ProblemImpl);
};
} // namespace internal
diff --git a/internal/ceres/schur_complement_solver.h b/internal/ceres/schur_complement_solver.h
index b788ce0..0a25ce1 100644
--- a/internal/ceres/schur_complement_solver.h
+++ b/internal/ceres/schur_complement_solver.h
@@ -128,7 +128,7 @@
scoped_ptr<BlockRandomAccessMatrix> lhs_;
scoped_array<double> rhs_;
- DISALLOW_COPY_AND_ASSIGN(SchurComplementSolver);
+ CERES_DISALLOW_COPY_AND_ASSIGN(SchurComplementSolver);
};
// Dense Cholesky factorization based solver.
@@ -142,7 +142,7 @@
virtual void InitStorage(const CompressedRowBlockStructure* bs);
virtual bool SolveReducedLinearSystem(double* solution);
- DISALLOW_COPY_AND_ASSIGN(DenseSchurComplementSolver);
+ CERES_DISALLOW_COPY_AND_ASSIGN(DenseSchurComplementSolver);
};
@@ -164,7 +164,7 @@
// once and reused in subsequent calls.
cholmod_factor* symbolic_factor_;
#endif // CERES_NO_SUITESPARSE
- DISALLOW_COPY_AND_ASSIGN(SparseSchurComplementSolver);
+ CERES_DISALLOW_COPY_AND_ASSIGN(SparseSchurComplementSolver);
};
} // namespace internal
diff --git a/internal/ceres/sparse_normal_cholesky_solver.h b/internal/ceres/sparse_normal_cholesky_solver.h
index 5445559..e38f39b 100644
--- a/internal/ceres/sparse_normal_cholesky_solver.h
+++ b/internal/ceres/sparse_normal_cholesky_solver.h
@@ -82,7 +82,7 @@
const LinearSolver::Options options_;
- DISALLOW_COPY_AND_ASSIGN(SparseNormalCholeskySolver);
+ CERES_DISALLOW_COPY_AND_ASSIGN(SparseNormalCholeskySolver);
};
} // namespace internal
diff --git a/internal/ceres/visibility_based_preconditioner.h b/internal/ceres/visibility_based_preconditioner.h
index c265a0e..888c65e 100644
--- a/internal/ceres/visibility_based_preconditioner.h
+++ b/internal/ceres/visibility_based_preconditioner.h
@@ -244,7 +244,7 @@
// Temporary vector used by RightMultiply.
cholmod_dense* tmp_rhs_;
- DISALLOW_COPY_AND_ASSIGN(VisibilityBasedPreconditioner);
+ CERES_DISALLOW_COPY_AND_ASSIGN(VisibilityBasedPreconditioner);
};
#else // SuiteSparse
// If SuiteSparse is not compiled in, the preconditioner is not