mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2024-12-26 03:16:35 +00:00
Access channels and controls via at function
To avoid UB on out of range access.
This commit is contained in:
parent
ca2bacd47a
commit
58b72e3836
4
extern/oics/ICSInputControlSystem.h
vendored
4
extern/oics/ICSInputControlSystem.h
vendored
@ -84,11 +84,11 @@ namespace ICS
|
||||
// in seconds
|
||||
void update(float timeSinceLastFrame);
|
||||
|
||||
inline Channel* getChannel(int i){ return mChannels[i]; };
|
||||
Channel* getChannel(int i){ return mChannels.at(i); };
|
||||
float getChannelValue(int i);
|
||||
inline int getChannelCount(){ return (int)mChannels.size(); };
|
||||
|
||||
inline Control* getControl(int i){ return mControls[i]; };
|
||||
Control* getControl(int i){ return mControls.at(i); };
|
||||
float getControlValue(int i);
|
||||
inline int getControlCount(){ return (int)mControls.size(); };
|
||||
inline void addControl(Control* control){ mControls.push_back(control); };
|
||||
|
Loading…
Reference in New Issue
Block a user