use long instead of int where pointers are casted
authorAndreas Oberritter <obi@opendreambox.org>
Tue, 25 Mar 2008 22:12:37 +0000 (22:12 +0000)
committerAndreas Oberritter <obi@opendreambox.org>
Tue, 25 Mar 2008 22:12:37 +0000 (22:12 +0000)
lib/driver/rc.cpp
lib/driver/rc.h
lib/driver/rcconsole.cpp
lib/driver/rcconsole.h
lib/driver/rcinput.cpp
lib/driver/rcinput.h
lib/gui/einput.cpp
lib/gui/elistbox.cpp
lib/gui/elistbox.h

index 43c1f2b..d943352 100644 (file)
@@ -102,7 +102,7 @@ void eRCInputEventDriver::keyPressed(int)
                        break;
                if (enabled && !input->islocked())
                        for (std::list<eRCDevice*>::iterator i(listeners.begin()); i!=listeners.end(); ++i)
-                               (*i)->handleCode((int)&ev);
+                               (*i)->handleCode((long)&ev);
        }
 }
 
index 909ebae..2a776ee 100644 (file)
@@ -41,7 +41,7 @@ public:
         * For Example, it might be 16bit codes with one bit make/break or special codes
         * for repeat.
         */
-       virtual void handleCode(int code)=0;
+       virtual void handleCode(long code)=0;
        /**
         * \brief Get user readable description.
         * \result The description.
index 7a625ff..53630ca 100644 (file)
@@ -90,7 +90,7 @@ void eRCConsoleDriver::keyPressed(int)
        }
 }
 
-void eRCConsole::handleCode(int code)
+void eRCConsole::handleCode(long code)
 {
        input->keyPressed(eRCKey(this, code, eRCKey::flagAscii));
 }
index 0c1dd63..4af2a4c 100644 (file)
@@ -35,7 +35,7 @@ public:
 class eRCConsole: public eRCDevice
 {
 public:
-       void handleCode(int code);
+       void handleCode(long code);
        eRCConsole(eRCDriver *driver);
        const char *getDescription() const;
        const char *getKeyDescription(const eRCKey &key) const;
index 107b337..d10d94f 100644 (file)
@@ -11,7 +11,7 @@
 #include <lib/base/init_num.h>
 #include <lib/driver/input_fake.h>
 
-void eRCDeviceInputDev::handleCode(int rccode)
+void eRCDeviceInputDev::handleCode(long rccode)
 {
        struct input_event *ev = (struct input_event *)rccode;
        if (ev->type!=EV_KEY)
index 2e288ba..c7f5697 100644 (file)
@@ -7,7 +7,7 @@ class eRCDeviceInputDev: public eRCDevice
 {
        int iskeyboard;
 public:
-       void handleCode(int code);
+       void handleCode(long code);
        eRCDeviceInputDev(eRCInputEventDriver *driver);
        const char *getDescription() const;
 };
index 30dc3f0..5cde53b 100644 (file)
@@ -94,9 +94,9 @@ int eInput::event(int event, void *data, void *data2)
        case evtAction:
                if (isVisible())
                {
-                       if ((int)data == ASCII_ACTIONS)
+                       if ((long)data == ASCII_ACTIONS)
                        {
-                               if ((int)data2 == gotAsciiCode)
+                               if ((long)data2 == gotAsciiCode)
                                {
                                        if (m_content)
                                        {
@@ -105,9 +105,9 @@ int eInput::event(int event, void *data, void *data2)
                                        }
                                }
                        }
-                       else if ((int)data == INPUT_ACTIONS)
+                       else if ((long)data == INPUT_ACTIONS)
                        {
-                               switch((int)data2)
+                               switch((long)data2)
                                {
                                case moveLeft:
                                        if (m_content)
@@ -146,8 +146,8 @@ int eInput::event(int event, void *data, void *data2)
                return 0;
        case evtKey:
        {
-               int key = (int)data;
-               int flags = (int)data2;
+               long key = (long)data;
+               long flags = (long)data2;
                if (m_content && !(flags & 1)) // only make/repeat, no break
                        return m_content->haveKey(key, m_mode);
                break;
index 73fbff3..d4c653f 100644 (file)
@@ -99,7 +99,7 @@ void eListbox::moveToEnd()
        }
 }
 
-void eListbox::moveSelection(int dir)
+void eListbox::moveSelection(long dir)
 {
                /* refuse to do anything without a valid list. */
        if (!m_content)
@@ -360,7 +360,7 @@ int eListbox::event(int event, void *data, void *data2)
        case evtAction:
                if (isVisible())
                {
-                       moveSelection((int)data2);
+                       moveSelection((long)data2);
                        return 1;
                }
                return 0;
index da66167..102e50f 100644 (file)
@@ -102,7 +102,7 @@ public:
        }; */
 
        int getCurrentIndex();
-       void moveSelection(int how);
+       void moveSelection(long how);
        void moveSelectionTo(int index);
        void moveToEnd();
        bool atBegin();