Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-12-29 05:54:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-29 05:54:58 +0400
commit4a427d8e0dad2e252fedf55c5941d5877e139b09 (patch)
tree32ca9768952f447e5a1e6c9936490d432dcb59ab /source/gameengine/GameLogic
parent6b211bac153aefce1087e6ac337613de17c4a53f (diff)
style cleanup
Diffstat (limited to 'source/gameengine/GameLogic')
-rw-r--r--source/gameengine/GameLogic/SCA_PythonJoystick.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gameengine/GameLogic/SCA_PythonJoystick.cpp b/source/gameengine/GameLogic/SCA_PythonJoystick.cpp
index ee792111705..8c0a0c5ae33 100644
--- a/source/gameengine/GameLogic/SCA_PythonJoystick.cpp
+++ b/source/gameengine/GameLogic/SCA_PythonJoystick.cpp
@@ -122,14 +122,14 @@ PyObject* SCA_PythonJoystick::pyattr_get_active_buttons(void *self_v, const KX_P
{
SCA_PythonJoystick* self = static_cast<SCA_PythonJoystick*>(self_v);
- int button_index = self->m_joystick->GetNumberOfButtons();
+ const int button_number = self->m_joystick->GetNumberOfButtons();
PyObject *list = PyList_New(0);
PyObject *value;
- for (int i=0; i < self->m_joystick->GetNumberOfButtons(); i++) {
+ for (int i=0; i < button_number; i++) {
if (self->m_joystick->aButtonPressIsPositive(i)) {
- value = PyLong_FromSsize_t(i);
+ value = PyLong_FromLong(i);
PyList_Append(list, value);
Py_DECREF(value);
}