Skip to content

Commit 01bc776

Browse files
committed
style: small refactor
1 parent fc3be9a commit 01bc776

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/module.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1854,9 +1854,7 @@ namespace py3lm {
18541854
return;
18551855
}
18561856

1857-
const bool hasRefParams = refParamsCount != 0;
1858-
1859-
if (hasRefParams) {
1857+
if (refParamsCount != 0) {
18601858
if (!PyTuple_CheckExact(result)) {
18611859
SetTypeError("Expected tuple as return value", result);
18621860

@@ -1899,7 +1897,7 @@ namespace py3lm {
18991897
}
19001898
}
19011899

1902-
PyObject* const returnObject = hasRefParams ? PyTuple_GET_ITEM(result, Py_ssize_t{ 0 }) : result;
1900+
PyObject* const returnObject = refParamsCount != 0 ? PyTuple_GET_ITEM(result, Py_ssize_t{ 0 }) : result;
19031901

19041902
if (!SetReturn(returnObject, retType, ret)) {
19051903
if (PyErr_Occurred()) {

0 commit comments

Comments
 (0)