mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Modernize more
Apply clang-tidy Google and modernize fixes without trailing return type
using:
$ clang-tidy -p <build-dir> \
-checks='-*,google-*,modernize-*,-modernize-use-trailing-return-type' {} -fix
Change-Id: I7450cc58ea9abf928f73a467e87876083217fa26
This commit is contained in:
committed by
Sameer Agarwal
parent
46b3495a4f
commit
c8658c8992
@@ -73,20 +73,22 @@ struct ArraySelector<T,
|
||||
true,
|
||||
fits_on_stack>
|
||||
: ceres::internal::FixedArray<T, max_num_elements_on_stack> {
|
||||
ArraySelector(int s)
|
||||
explicit ArraySelector(int s)
|
||||
: ceres::internal::FixedArray<T, max_num_elements_on_stack>(s) {}
|
||||
};
|
||||
|
||||
template <typename T, int num_elements, int max_num_elements_on_stack>
|
||||
struct ArraySelector<T, num_elements, max_num_elements_on_stack, false, true>
|
||||
: std::array<T, num_elements> {
|
||||
ArraySelector(int s) { CHECK_EQ(s, num_elements); }
|
||||
explicit ArraySelector(int s) { CHECK_EQ(s, num_elements); }
|
||||
};
|
||||
|
||||
template <typename T, int num_elements, int max_num_elements_on_stack>
|
||||
struct ArraySelector<T, num_elements, max_num_elements_on_stack, false, false>
|
||||
: std::vector<T> {
|
||||
ArraySelector(int s) : std::vector<T>(s) { CHECK_EQ(s, num_elements); }
|
||||
explicit ArraySelector(int s) : std::vector<T>(s) {
|
||||
CHECK_EQ(s, num_elements);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
||||
Reference in New Issue
Block a user