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 | 93bd29c13d3355b2544c2fd40dff1f4f985f9b57 (patch) | |
| tree | 9f07f3c0e7d9e9bac8a27d511e6dfdd06f42344b /src/categories.cpp | |
| parent | 637ce6bcc1b10198eb2a21570b6a97e122814f55 (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 28b1f4a2..57e18a28 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));
}
|
