fix readability-*:
* readability-const-return-type * readability-container-data-pointer * readability-container-size-empty * readability-delete-null-pointer * readability-else-after-return * readability-inconsistent-declaration-parameter-name * readability-redundant-member-init * readability-redundant-smartptr-get * readability-redundant-string-cstr * readability-use-anyofallof * readability-static-definition-in-anonymous-namespace * readability-static-accessed-through-instance * readability-simplify-boolean-expr
This commit is contained in:
@@ -515,22 +515,22 @@ PyObject* RotationPy::getCustomAttributes(const char* attr) const
|
||||
this->getRotationPtr()->getValue(mat);
|
||||
return new MatrixPy(mat);
|
||||
}
|
||||
else if (strcmp(attr, "Yaw") == 0) {
|
||||
if (strcmp(attr, "Yaw") == 0) {
|
||||
double A {}, B {}, C {};
|
||||
this->getRotationPtr()->getYawPitchRoll(A, B, C);
|
||||
return PyFloat_FromDouble(A);
|
||||
}
|
||||
else if (strcmp(attr, "Pitch") == 0) {
|
||||
if (strcmp(attr, "Pitch") == 0) {
|
||||
double A {}, B {}, C {};
|
||||
this->getRotationPtr()->getYawPitchRoll(A, B, C);
|
||||
return PyFloat_FromDouble(B);
|
||||
}
|
||||
else if (strcmp(attr, "Roll") == 0) {
|
||||
if (strcmp(attr, "Roll") == 0) {
|
||||
double A {}, B {}, C {};
|
||||
this->getRotationPtr()->getYawPitchRoll(A, B, C);
|
||||
return PyFloat_FromDouble(C);
|
||||
}
|
||||
else if (strcmp(attr, "toEuler") == 0) {
|
||||
if (strcmp(attr, "toEuler") == 0) {
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-const-cast)
|
||||
Py::Object self(const_cast<RotationPy*>(this), false);
|
||||
return Py::new_reference_to(self.getAttr("getYawPitchRoll"));
|
||||
|
||||
Reference in New Issue
Block a user