summaryrefslogtreecommitdiff
path: root/src/categories.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/categories.cpp')
-rw-r--r--src/categories.cpp8
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));
}