summaryrefslogtreecommitdiff
path: root/src/gui/widgets/setuptouchitem.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-31 22:27:26 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-31 22:46:08 +0300
commit82ace39b426a843382a6a809e7b66487c1412494 (patch)
treec8434c5465d0f0a44aa1a4b438dbe4dfbce317f6 /src/gui/widgets/setuptouchitem.cpp
parentf355fe070293a3f80b33ee0bc0154b2fe767fc4d (diff)
downloadplus-82ace39b426a843382a6a809e7b66487c1412494.tar.gz
plus-82ace39b426a843382a6a809e7b66487c1412494.tar.bz2
plus-82ace39b426a843382a6a809e7b66487c1412494.tar.xz
plus-82ace39b426a843382a6a809e7b66487c1412494.zip
Fix code style and compilation under windows.
Diffstat (limited to 'src/gui/widgets/setuptouchitem.cpp')
-rw-r--r--src/gui/widgets/setuptouchitem.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/widgets/setuptouchitem.cpp b/src/gui/widgets/setuptouchitem.cpp
index 06faf7b19..8fea0478e 100644
--- a/src/gui/widgets/setuptouchitem.cpp
+++ b/src/gui/widgets/setuptouchitem.cpp
@@ -39,7 +39,8 @@ class SortTouchActionFunctor final
}
} touchActionSorter;
-TouchActionsModel::TouchActionsModel()
+TouchActionsModel::TouchActionsModel() :
+ NamesModel()
{
std::vector<SetupActionData*> data;
@@ -66,14 +67,14 @@ TouchActionsModel::TouchActionsModel()
}
}
-int TouchActionsModel::getActionFromSelection(int sel)
+int TouchActionsModel::getActionFromSelection(const int sel) const
{
- if (sel < 0 || sel > mActionId.size())
+ if (sel < 0 || sel > static_cast<signed int>(mActionId.size()))
return -1;
return mActionId[sel];
}
-int TouchActionsModel::getSelectionFromAction(int action)
+int TouchActionsModel::getSelectionFromAction(const int action) const
{
std::map<int, int>::const_iterator it
= mActionToSelection.find(action);