Fixed << operator to be usable in .I file

This commit is contained in:
fireclawthefox 2016-08-10 16:44:09 +02:00
parent 3227fe2ebd
commit f1444fcff9
2 changed files with 6 additions and 5 deletions

View File

@ -290,7 +290,7 @@ get_num_controls() const {
* the various controls by index number.
*/
INLINE void InputDevice::
set_control_map(int index, ControlAxis axis) {
set_control_map(int index, InputDevice::ControlAxis axis) {
LightMutexHolder holder(_lock);
nassertv(index >= 0);
if (index >= (int)_controls.size()) {
@ -348,7 +348,7 @@ get_control(size_t index) const {
* if the axis was not found in the list.
*/
INLINE InputDevice::AnalogState InputDevice::
find_control(ControlAxis axis) const {
find_control(InputDevice::ControlAxis axis) const {
for (int i; i < (int)_controls.size(); i++) {
if (_controls[i].axis == axis) {
return _controls[i];

View File

@ -287,7 +287,8 @@ PUBLISHED:
INLINE AnalogState get_control(size_t index) const;
INLINE AnalogState find_control(ControlAxis axis) const;
// Make device controls iterable
// Make device buttons and controls iterable
MAKE_SEQ_PROPERTY(buttons, get_num_buttons, get_button);
MAKE_SEQ_PROPERTY(controls, get_num_controls, get_control);
public:
@ -313,8 +314,8 @@ INLINE ostream &operator << (ostream &out, const InputDevice &device) {
return out;
}
ostream &operator << (ostream &out, InputDevice::DeviceClass dc);
ostream &operator << (ostream &out, InputDevice::ControlAxis axis);
EXPCL_PANDA_DEVICE ostream &operator << (ostream &out, InputDevice::DeviceClass dc);
EXPCL_PANDA_DEVICE ostream &operator << (ostream &out, InputDevice::ControlAxis axis);
#include "inputDevice.I"