Fix code formatting in a few files

This commit is contained in:
Oliver Hamlet
2025-06-08 18:01:43 +01:00
parent 3744908265
commit f078c08bf9
5 changed files with 9 additions and 12 deletions
+3 -1
View File
@@ -40,7 +40,9 @@ void HandleError(std::string_view operation, int returnCode) {
std::string err;
lci_get_error_message(&message);
if (message == nullptr) {
err = fmt::format("Failed to {}. loot-condition-interpreter error code: {}", operation, returnCode);
err = fmt::format("Failed to {}. loot-condition-interpreter error code: {}",
operation,
returnCode);
} else {
err = fmt::format("Failed to {}. Details: {}", operation, message);
}
+2 -5
View File
@@ -30,15 +30,12 @@ namespace loot {
Message::Message(const MessageType type,
std::string_view content,
std::string_view condition) :
type_(type),
content_({MessageContent(content)}), condition_(condition) {}
type_(type), content_({MessageContent(content)}), condition_(condition) {}
Message::Message(const MessageType type,
const std::vector<MessageContent>& content,
std::string_view condition) :
type_(type),
content_(content),
condition_(condition) {
type_(type), content_(content), condition_(condition) {
if (content.size() > 1) {
bool englishStringExists = false;
for (const auto& mc : content) {
+1 -2
View File
@@ -25,8 +25,7 @@
#include "loot/metadata/plugin_cleaning_data.h"
namespace loot {
PluginCleaningData::PluginCleaningData(uint32_t crc,
std::string_view utility) :
PluginCleaningData::PluginCleaningData(uint32_t crc, std::string_view utility) :
crc_(crc), utility_(utility) {}
PluginCleaningData::PluginCleaningData(
+2 -1
View File
@@ -170,7 +170,8 @@ bool PluginMetadata::NameMatches(std::string_view pluginName) const {
throw std::runtime_error("Regex plugin does not have regex object");
}
return std::regex_match(pluginName.begin(), pluginName.end(), nameRegex_.value());
return std::regex_match(
pluginName.begin(), pluginName.end(), nameRegex_.value());
}
return CompareFilenames(name_, pluginName) == 0;
+1 -3
View File
@@ -28,9 +28,7 @@ namespace loot {
Tag::Tag(std::string_view tag,
const bool isAddition,
std::string_view condition) :
name_(tag),
addTag_(isAddition),
condition_(condition) {}
name_(tag), addTag_(isAddition), condition_(condition) {}
bool Tag::IsAddition() const { return addTag_; }