diff options
| author | Tannin <devnull@localhost> | 2014-09-24 19:51:51 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-09-24 19:51:51 +0200 |
| commit | a62ecc5bf1e92e6dd2ba8e6e61a797641c254d92 (patch) | |
| tree | 5e3538861b2768a1c16b3daf7f073e05b5764059 /src/categories.cpp | |
| parent | 5f1022917b655650f842dc8f34967716081685ef (diff) | |
- several style fixes suggested by static analysis
- will now support up to 4 levels of version numbers (major.minor.subminor.subsubminor
Diffstat (limited to 'src/categories.cpp')
| -rw-r--r-- | src/categories.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/categories.cpp b/src/categories.cpp index ec3e29f4..dca6311d 100644 --- a/src/categories.cpp +++ b/src/categories.cpp @@ -232,7 +232,7 @@ void CategoryFactory::loadDefaultCategories() int CategoryFactory::getParentID(unsigned int index) const
{
- if ((index < 0) || (index >= m_Categories.size())) {
+ if (index >= m_Categories.size()) {
throw MyException(QObject::tr("invalid index %1").arg(index));
}
@@ -267,7 +267,7 @@ bool CategoryFactory::isDecendantOf(int id, int parentID) const bool CategoryFactory::hasChildren(unsigned int index) const
{
- if ((index < 0) || (index >= m_Categories.size())) {
+ if (index >= m_Categories.size()) {
throw MyException(QObject::tr("invalid index %1").arg(index));
}
@@ -277,7 +277,7 @@ bool CategoryFactory::hasChildren(unsigned int index) const QString CategoryFactory::getCategoryName(unsigned int index) const
{
- if ((index < 0) || (index >= m_Categories.size())) {
+ if (index >= m_Categories.size()) {
throw MyException(QObject::tr("invalid index %1").arg(index));
}
@@ -287,7 +287,7 @@ QString CategoryFactory::getCategoryName(unsigned int index) const int CategoryFactory::getCategoryID(unsigned int index) const
{
- if ((index < 0) || (index >= m_Categories.size())) {
+ if (index >= m_Categories.size()) {
throw MyException(QObject::tr("invalid index %1").arg(index));
}
|
