diff options
| author | Jeremy Rimpo <jeremy.rimpo@servermonkey.com> | 2023-09-18 21:44:45 -0500 |
|---|---|---|
| committer | Jeremy Rimpo <jeremy.rimpo@servermonkey.com> | 2023-09-21 17:35:05 -0500 |
| commit | f6bb73deb21228acf0e7f74500f50421143aa739 (patch) | |
| tree | 85e5f9460282555857d455ab71e0a27a026e6f61 /src/categories.h | |
| parent | 4342fe3ce16e1e14fb44cf2676e3887002f67ec4 (diff) | |
Clang cleanup
Diffstat (limited to 'src/categories.h')
| -rw-r--r-- | src/categories.h | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/src/categories.h b/src/categories.h index 86e66b1c..3f91e6c5 100644 --- a/src/categories.h +++ b/src/categories.h @@ -31,7 +31,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. *to look up categories, optimized to where the request comes from. Therefore be very *careful which of the two you have available **/ -class CategoryFactory : public QObject { +class CategoryFactory : public QObject +{ Q_OBJECT; friend class CategoriesDialog; @@ -53,30 +54,37 @@ public: }; public: - struct NexusCategory { - NexusCategory(const QString& name, const int nexusID) - : m_Name(name), m_ID(nexusID) {} + struct NexusCategory + { + NexusCategory(const QString& name, const int nexusID) : m_Name(name), m_ID(nexusID) + {} QString m_Name; int m_ID; int m_CategoryID = -1; - friend bool operator==(const NexusCategory& LHS, const NexusCategory& RHS) { + friend bool operator==(const NexusCategory& LHS, const NexusCategory& RHS) + { return LHS.m_ID == RHS.m_ID; } - friend bool operator==(const NexusCategory& LHS, const int RHS) { + friend bool operator==(const NexusCategory& LHS, const int RHS) + { return LHS.m_ID == RHS; } - friend bool operator<(const NexusCategory& LHS, const NexusCategory& RHS) { + friend bool operator<(const NexusCategory& LHS, const NexusCategory& RHS) + { return LHS.m_ID < RHS.m_ID; } }; - struct Category { - Category(int sortValue, int id, const QString& name, int parentID, std::vector<NexusCategory> nexusCats) - : m_SortValue(sortValue), m_ID(id), m_Name(name), m_HasChildren(false), m_ParentID(parentID) - , m_NexusCats(nexusCats) {} + struct Category + { + Category(int sortValue, int id, const QString& name, int parentID, + std::vector<NexusCategory> nexusCats) + : m_SortValue(sortValue), m_ID(id), m_Name(name), m_HasChildren(false), + m_ParentID(parentID), m_NexusCats(nexusCats) + {} int m_SortValue; int m_ID; int m_ParentID; @@ -108,7 +116,8 @@ public: void setNexusCategories(std::vector<CategoryFactory::NexusCategory>& nexusCats); - int addCategory(const QString& name, const std::vector<NexusCategory>& nexusCats, int parentID); + int addCategory(const QString& name, const std::vector<NexusCategory>& nexusCats, + int parentID); /** * @brief retrieve the number of available categories @@ -222,7 +231,8 @@ private: void loadDefaultCategories(); - void addCategory(int id, const QString& name, const std::vector<NexusCategory>& nexusCats, int parentID); + void addCategory(int id, const QString& name, + const std::vector<NexusCategory>& nexusCats, int parentID); void addCategory(int id, const QString& name, int parentID); void setParents(); |
