mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Make UndefinedGroupError::GetGroupName() const
Also move the constructor and function definitions out of the header where they're declared.
This commit is contained in:
@@ -193,6 +193,7 @@ set(LIBLOOT_SRC_API_CPP_FILES
|
||||
"${CMAKE_SOURCE_DIR}/src/api/sorting/plugin_sort.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/api/sorting/plugin_graph.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/api/sorting/plugin_sorting_data.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/api/sorting/undefined_group_error.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/api/helpers/crc.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/api/helpers/text.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/api/vertex.cpp")
|
||||
|
||||
@@ -39,15 +39,13 @@ public:
|
||||
* @brief Construct an exception for an undefined group.
|
||||
* @param groupName The name of the group that is undefined.
|
||||
*/
|
||||
LOOT_API UndefinedGroupError(const std::string& groupName) :
|
||||
std::runtime_error("The group \"" + groupName + "\" does not exist"),
|
||||
groupName_(groupName) {}
|
||||
LOOT_API UndefinedGroupError(const std::string& groupName);
|
||||
|
||||
/**
|
||||
* Get the name of the undefined group.
|
||||
* @return A group name.
|
||||
*/
|
||||
LOOT_API std::string GetGroupName() { return groupName_; }
|
||||
LOOT_API std::string GetGroupName() const;
|
||||
|
||||
private:
|
||||
std::string groupName_;
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/* LOOT
|
||||
|
||||
A load order optimisation tool for Oblivion, Skyrim, Fallout 3 and
|
||||
Fallout: New Vegas.
|
||||
|
||||
Copyright (C) 2018 WrinklyNinja
|
||||
|
||||
This file is part of LOOT.
|
||||
|
||||
LOOT is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
LOOT is distributed in the hope that it will
|
||||
be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LOOT. If not, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "loot/exception/undefined_group_error.h"
|
||||
|
||||
#include "api/sorting/plugin_graph.h"
|
||||
|
||||
namespace loot {
|
||||
UndefinedGroupError::UndefinedGroupError(const std::string& groupName) :
|
||||
std::runtime_error("The group \"" + groupName + "\" does not exist"),
|
||||
groupName_(groupName) {}
|
||||
|
||||
std::string UndefinedGroupError::GetGroupName() const { return groupName_; }
|
||||
}
|
||||
Reference in New Issue
Block a user