Skip to content

Commit 97290f4

Browse files
authored
Merge pull request #546 from ManifoldFR/topic/update-clang-format-cpp-standard
Update C++ standard for clang-format to 11, apply updated formatting rules
2 parents 65ebafd + 26e9525 commit 97290f4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+232
-231
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
BasedOnStyle: Google
22
SortIncludes: false
3-
Standard: Cpp03
3+
Standard: Cpp11

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@
66

77
# pre-commit run -a (Guilhem Saurel, 2024-02-19)
88
0bae435330ee475f8dbb11bf5e672284d294d9b3
9+
10+
# pre-commit run -a (ManifoldFR, 2025-04-25)
11+
51b49061575d46e0668eba0da200217cbfd9e883

.pre-commit-config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ repos:
2626
rev: v20.1.0
2727
hooks:
2828
- id: clang-format
29-
args:
30-
- '--style={BasedOnStyle: Google, SortIncludes: false, Standard: Cpp03}'
3129
- repo: https://github.com/pre-commit/pre-commit-hooks
3230
rev: v5.0.0
3331
hooks:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1010

1111
- Fix handling of non sorted sparse matrix ([#538](https://github.com/stack-of-tasks/eigenpy/pull/538))
1212

13+
### Changed
14+
15+
- Update clang-format standard to C++11, reformat code
16+
1317
## [3.10.3] - 2025-02-11
1418

1519
### Added

include/eigenpy/alignment.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ namespace objects {
108108

109109
// Force alignment of instance with value_holder
110110
template <typename Derived>
111-
struct instance<value_holder<Derived> >
112-
: ::eigenpy::aligned_instance<value_holder<Derived> > {};
111+
struct instance<value_holder<Derived>>
112+
: ::eigenpy::aligned_instance<value_holder<Derived>> {};
113113

114114
} // namespace objects
115115
} // namespace python

include/eigenpy/angle-axis.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ template <typename AngleAxis>
1313
class AngleAxisVisitor;
1414

1515
template <typename Scalar>
16-
struct call<Eigen::AngleAxis<Scalar> > {
16+
struct call<Eigen::AngleAxis<Scalar>> {
1717
typedef Eigen::AngleAxis<Scalar> AngleAxis;
1818

1919
static inline void expose() { AngleAxisVisitor<AngleAxis>::expose(); }
@@ -26,7 +26,7 @@ struct call<Eigen::AngleAxis<Scalar> > {
2626
};
2727

2828
template <typename AngleAxis>
29-
class AngleAxisVisitor : public bp::def_visitor<AngleAxisVisitor<AngleAxis> > {
29+
class AngleAxisVisitor : public bp::def_visitor<AngleAxisVisitor<AngleAxis>> {
3030
typedef typename AngleAxis::Scalar Scalar;
3131
typedef typename AngleAxis::Vector3 Vector3;
3232
typedef typename AngleAxis::Matrix3 Matrix3;

include/eigenpy/copyable.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace eigenpy {
1515
/// copy constructor.
1616
///
1717
template <class C>
18-
struct CopyableVisitor : public bp::def_visitor<CopyableVisitor<C> > {
18+
struct CopyableVisitor : public bp::def_visitor<CopyableVisitor<C>> {
1919
template <class PyClass>
2020
void visit(PyClass& cl) const {
2121
cl.def("copy", &copy, bp::arg("self"), "Returns a copy of *this.");

include/eigenpy/decompositions/ColPivHouseholderQR.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace eigenpy {
1515
template <typename _MatrixType>
1616
struct ColPivHouseholderQRSolverVisitor
1717
: public boost::python::def_visitor<
18-
ColPivHouseholderQRSolverVisitor<_MatrixType> > {
18+
ColPivHouseholderQRSolverVisitor<_MatrixType>> {
1919
typedef _MatrixType MatrixType;
2020
typedef typename MatrixType::Scalar Scalar;
2121
typedef typename MatrixType::RealScalar RealScalar;

include/eigenpy/decompositions/CompleteOrthogonalDecomposition.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace eigenpy {
1515
template <typename _MatrixType>
1616
struct CompleteOrthogonalDecompositionSolverVisitor
1717
: public boost::python::def_visitor<
18-
CompleteOrthogonalDecompositionSolverVisitor<_MatrixType> > {
18+
CompleteOrthogonalDecompositionSolverVisitor<_MatrixType>> {
1919
typedef _MatrixType MatrixType;
2020
typedef typename MatrixType::Scalar Scalar;
2121
typedef typename MatrixType::RealScalar RealScalar;

include/eigenpy/decompositions/EigenSolver.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace eigenpy {
1616

1717
template <typename _MatrixType>
1818
struct EigenSolverVisitor
19-
: public boost::python::def_visitor<EigenSolverVisitor<_MatrixType> > {
19+
: public boost::python::def_visitor<EigenSolverVisitor<_MatrixType>> {
2020
typedef _MatrixType MatrixType;
2121
typedef typename MatrixType::Scalar Scalar;
2222
typedef Eigen::EigenSolver<MatrixType> Solver;
@@ -26,7 +26,7 @@ struct EigenSolverVisitor
2626
cl.def(bp::init<>("Default constructor"))
2727
.def(bp::init<Eigen::DenseIndex>(
2828
bp::arg("size"), "Default constructor with memory preallocation"))
29-
.def(bp::init<MatrixType, bp::optional<bool> >(
29+
.def(bp::init<MatrixType, bp::optional<bool>>(
3030
bp::args("matrix", "compute_eigen_vectors"),
3131
"Computes eigendecomposition of given matrix"))
3232

0 commit comments

Comments
 (0)