mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 02:15:34 +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
1 changed files with 2 additions and 2 deletions
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 a new issue