From f6bb73deb21228acf0e7f74500f50421143aa739 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Mon, 18 Sep 2023 21:44:45 -0500 Subject: Clang cleanup --- src/categories.h | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'src/categories.h') 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 . *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 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 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& nexusCats); - int addCategory(const QString& name, const std::vector& nexusCats, int parentID); + int addCategory(const QString& name, const std::vector& 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& nexusCats, int parentID); + void addCategory(int id, const QString& name, + const std::vector& nexusCats, int parentID); void addCategory(int id, const QString& name, int parentID); void setParents(); -- cgit v1.3.1