From b97424435f22ca1a815b6601728552f558a2a77c Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Fri, 18 Feb 2022 23:01:42 +0000 Subject: [PATCH] Add Group::DEFAULT_NAME So that the constant is accessible to LOOT at compile time. --- include/loot/metadata/group.h | 5 +++++ src/api/metadata/group.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/loot/metadata/group.h b/include/loot/metadata/group.h index 86c92158..40a76c49 100644 --- a/include/loot/metadata/group.h +++ b/include/loot/metadata/group.h @@ -35,6 +35,11 @@ namespace loot { */ class Group { public: + /** + * The name of the group to which all plugins belong by default. + */ + static constexpr const char* DEFAULT_NAME = "default"; + /** * Construct a Group with the name "default" and an empty set of groups to * load after. diff --git a/src/api/metadata/group.cpp b/src/api/metadata/group.cpp index a9daca98..a3b5f62d 100644 --- a/src/api/metadata/group.cpp +++ b/src/api/metadata/group.cpp @@ -27,7 +27,7 @@ #include "api/metadata/yaml/group.h" namespace loot { -Group::Group() : name_("default") {} +Group::Group() : name_(Group::DEFAULT_NAME) {} Group::Group(const std::string& name, const std::vector& afterGroups,