Turn loops into range-based form

and some things suggested by cppcheck and compiler warnings.
This commit is contained in:
Tillmann Karras
2014-02-12 16:00:34 +01:00
parent 2ff794d299
commit 404624bf0b
52 changed files with 199 additions and 230 deletions

View File

@ -108,8 +108,8 @@ namespace ButtonManager
: _dev(dev) {}
~InputDevice()
{
for (auto it = _binds.begin(); it != _binds.end(); ++it)
delete it->second;
for (const auto& bind : _binds)
delete bind.second;
}
void AddBind(sBind *bind) { _binds[bind->_buttontype] = bind; _inputbinds[bind->_bind] = bind; }
void PressEvent(int button, int action);