Skip to content

Commit 7f17b89

Browse files
generatedunixname89002005287564facebook-github-bot
authored andcommitted
Fix CQS signal modernize-use-using in fbcode/mapillary/opensfm
Differential Revision: D79708438 fbshipit-source-id: 678971b789f73efa7f844a882ae529a25d61e3cf
1 parent 7e5cb4a commit 7f17b89

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

opensfm/src/geometry/essential.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ std::vector<Eigen::Matrix<double, 3, 3>> EssentialFivePoints(IT begin, IT end) {
127127

128128
// Compute the solutions from action matrix's eigenvectors.
129129
Eigen::EigenSolver<Eigen::MatrixXd> es(At);
130-
typedef Eigen::EigenSolver<Eigen::MatrixXd>::EigenvectorsType Matc;
130+
using Matc = Eigen::EigenSolver<Eigen::MatrixXd>::EigenvectorsType;
131131
Matc V = es.eigenvectors();
132132
Matc solutions(4, 10);
133133
solutions.row(0) = V.row(6).array() / V.row(9).array();

opensfm/src/geometry/test/camera_functions_test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ TEST_F(FunctionFixture, EvaluatesDerivativesCorrectly) {
115115
ASSERT_NEAR(expected, evaluated, 1e-20);
116116

117117
/* Jacobian ordering : d_input | d_parameters */
118-
typedef Eigen::AutoDiffScalar<VecXd> AScalar;
118+
using AScalar = Eigen::AutoDiffScalar<VecXd>;
119119
VecX<AScalar> eval_adiff(1);
120120
eval_adiff(0).value() = in[0];
121121
eval_adiff(0).derivatives() = VecXd::Unit(7, 0);
@@ -163,7 +163,7 @@ TEST_F(PoseFixture, EvaluatesCorrectly) {
163163
}
164164

165165
TEST_F(PoseFixture, EvaluatesAllDerivativesCorrectly) {
166-
typedef Eigen::AutoDiffScalar<VecXd> AScalar;
166+
using AScalar = Eigen::AutoDiffScalar<VecXd>;
167167

168168
VecX<AScalar> point_adiff(3);
169169
constexpr int size = 9;
@@ -197,7 +197,7 @@ TEST_F(PoseFixture, EvaluatesAllDerivativesCorrectly) {
197197
}
198198

199199
TEST_F(PoseFixture, EvaluatesPointDerivativesCorrectly) {
200-
typedef Eigen::AutoDiffScalar<VecXd> AScalar;
200+
using AScalar = Eigen::AutoDiffScalar<VecXd>;
201201

202202
VecX<AScalar> point_adiff(3);
203203

opensfm/src/map/pybind_utils.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ template <return_value_policy Policy = return_value_policy::reference_internal,
5757
typename... Extra>
5858
iterator make_ref_value_iterator(Iterator first, Sentinel last,
5959
Extra &&...extra) {
60-
typedef detail::sfm_iterator_state<Iterator, Sentinel,
61-
detail::RefValueIterator, Policy>
62-
state;
60+
using state = detail::sfm_iterator_state<Iterator, Sentinel,
61+
detail::RefValueIterator, Policy>;
6362

6463
if (!detail::get_type_info(typeid(state), false)) {
6564
class_<state>(handle(), "ref_value_iterator", pybind11::module_local())
@@ -91,9 +90,8 @@ template <
9190
pybind11::tuple, // decltype(&((*std::declval<Iterator>()).second)),
9291
typename... Extra>
9392
iterator make_ref_iterator(Iterator first, Sentinel last, Extra &&...extra) {
94-
typedef detail::sfm_iterator_state<Iterator, Sentinel, detail::ValueIterator,
95-
Policy>
96-
state;
93+
using state = detail::sfm_iterator_state<Iterator, Sentinel,
94+
detail::ValueIterator, Policy>;
9795

9896
if (!detail::get_type_info(typeid(state), false)) {
9997
class_<state>(handle(), "ref_iterator", pybind11::module_local())

0 commit comments

Comments
 (0)