diff options
Diffstat (limited to 'src/categories.cpp')
| -rw-r--r-- | src/categories.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/categories.cpp b/src/categories.cpp index 400cc74b..f096a902 100644 --- a/src/categories.cpp +++ b/src/categories.cpp @@ -317,9 +317,11 @@ int CategoryFactory::getCategoryIndex(int ID) const int CategoryFactory::getCategoryID(const QString &name) const
{
- auto iter = std::find_if(m_Categories.begin(), m_Categories.end(), [name] (const Category &cat) -> bool {
+ auto iter = std::find_if(m_Categories.begin(), m_Categories.end(),
+ [name] (const Category &cat) -> bool {
return cat.m_Name == name;
});
+
if (iter != m_Categories.end()) {
return iter->m_ID;
} else {
|
