mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Run clang-format on whole repository
Using: shopt -s globstar /mnt/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2019/Community/VC/Tools/Llvm/bin/clang-format.exe -i include/**/*.h src/**/*.h src/**/*.cpp
This commit is contained in:
+16
-9
@@ -43,9 +43,11 @@
|
||||
|
||||
namespace loot {
|
||||
/**@}*/
|
||||
/**********************************************************************//**
|
||||
* @name Logging Functions
|
||||
*************************************************************************/
|
||||
/**********************************************************************/ /**
|
||||
* @name
|
||||
*Logging
|
||||
*Functions
|
||||
*************************************************************************/
|
||||
/**@{*/
|
||||
|
||||
/**
|
||||
@@ -60,9 +62,11 @@ LOOT_API void SetLoggingCallback(
|
||||
std::function<void(LogLevel, const char*)> callback);
|
||||
|
||||
/**@}*/
|
||||
/**********************************************************************//**
|
||||
* @name Version Functions
|
||||
*************************************************************************/
|
||||
/**********************************************************************/ /**
|
||||
* @name
|
||||
*Version
|
||||
*Functions
|
||||
*************************************************************************/
|
||||
/**@{*/
|
||||
|
||||
/**
|
||||
@@ -83,9 +87,12 @@ LOOT_API bool IsCompatible(const unsigned int major,
|
||||
const unsigned int patch);
|
||||
|
||||
/**@}*/
|
||||
/**********************************************************************//**
|
||||
* @name Lifecycle Management Functions
|
||||
*************************************************************************/
|
||||
/**********************************************************************/ /**
|
||||
* @name
|
||||
*Lifecycle
|
||||
*Management
|
||||
*Functions
|
||||
*************************************************************************/
|
||||
/**@{*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -62,9 +62,10 @@ public:
|
||||
* should be loaded. If an empty path, no masterlist prelude will be
|
||||
* loaded.
|
||||
*/
|
||||
virtual void LoadLists(const std::filesystem::path& masterlist_path,
|
||||
const std::filesystem::path& userlist_path = "",
|
||||
const std::filesystem::path& masterlist_prelude_path = "") = 0;
|
||||
virtual void LoadLists(
|
||||
const std::filesystem::path& masterlist_path,
|
||||
const std::filesystem::path& userlist_path = "",
|
||||
const std::filesystem::path& masterlist_prelude_path = "") = 0;
|
||||
|
||||
/**
|
||||
* Writes a metadata file containing all loaded user-added metadata.
|
||||
|
||||
@@ -47,6 +47,7 @@ public:
|
||||
LOOT_API explicit Filename(const std::string& filename);
|
||||
|
||||
LOOT_API explicit operator std::string() const;
|
||||
|
||||
private:
|
||||
std::string filename_;
|
||||
};
|
||||
@@ -56,7 +57,7 @@ private:
|
||||
* @returns True if the filenames are case-insensitively equal and all other
|
||||
* fields are case-sensitively equal, false otherwise.
|
||||
*/
|
||||
LOOT_API bool operator==(const Filename& lhs,const Filename& rhs);
|
||||
LOOT_API bool operator==(const Filename& lhs, const Filename& rhs);
|
||||
|
||||
/**
|
||||
* Check if two Filename objects are not equal.
|
||||
@@ -65,32 +66,34 @@ LOOT_API bool operator==(const Filename& lhs,const Filename& rhs);
|
||||
LOOT_API bool operator!=(const Filename& lhs, const Filename& rhs);
|
||||
|
||||
/**
|
||||
* A less-than operator implemented with no semantics so that Filename objects can
|
||||
* be stored in sets.
|
||||
* @returns True if this Filename is less than the given Filename, false otherwise.
|
||||
* A less-than operator implemented with no semantics so that Filename objects
|
||||
* can be stored in sets.
|
||||
* @returns True if this Filename is less than the given Filename, false
|
||||
* otherwise.
|
||||
*/
|
||||
LOOT_API bool operator<(const Filename& lhs,const Filename& rhs);
|
||||
LOOT_API bool operator<(const Filename& lhs, const Filename& rhs);
|
||||
|
||||
/**
|
||||
* Check if the first Filename object is greater than the second Filename object.
|
||||
* @returns True if the second Filename object is less than the first Filename object,
|
||||
* false otherwise.
|
||||
* Check if the first Filename object is greater than the second Filename
|
||||
* object.
|
||||
* @returns True if the second Filename object is less than the first Filename
|
||||
* object, false otherwise.
|
||||
*/
|
||||
LOOT_API bool operator>(const Filename& lhs, const Filename& rhs);
|
||||
|
||||
/**
|
||||
* Check if the first Filename object is less than or equal to the second Filename
|
||||
* object.
|
||||
* @returns True if the first Filename object is not greater than the second Filename
|
||||
* object, false otherwise.
|
||||
* Check if the first Filename object is less than or equal to the second
|
||||
* Filename object.
|
||||
* @returns True if the first Filename object is not greater than the second
|
||||
* Filename object, false otherwise.
|
||||
*/
|
||||
LOOT_API bool operator<=(const Filename& lhs, const Filename& rhs);
|
||||
|
||||
/**
|
||||
* Check if the first Filename object is greater than or equal to the second Filename
|
||||
* object.
|
||||
* @returns True if the first Filename object is not less than the second Filename
|
||||
* object, false otherwise.
|
||||
* Check if the first Filename object is greater than or equal to the second
|
||||
* Filename object.
|
||||
* @returns True if the first Filename object is not less than the second
|
||||
* Filename object, false otherwise.
|
||||
*/
|
||||
LOOT_API bool operator>=(const Filename& lhs, const Filename& rhs);
|
||||
}
|
||||
|
||||
@@ -54,8 +54,8 @@ public:
|
||||
* @return A Group object.
|
||||
*/
|
||||
LOOT_API explicit Group(const std::string& name,
|
||||
const std::vector<std::string>& afterGroups = {},
|
||||
const std::string& description = "");
|
||||
const std::vector<std::string>& afterGroups = {},
|
||||
const std::string& description = "");
|
||||
|
||||
/**
|
||||
* Check if two Group objects are equal by comparing their names.
|
||||
|
||||
@@ -49,12 +49,13 @@ public:
|
||||
* A name for the URL, eg. the page or site name.
|
||||
* @return A Location object.
|
||||
*/
|
||||
LOOT_API explicit Location(const std::string& url, const std::string& name = "");
|
||||
LOOT_API explicit Location(const std::string& url,
|
||||
const std::string& name = "");
|
||||
|
||||
/**
|
||||
* A less-than operator implemented with no semantics so that Location objects
|
||||
* can be stored in sets.
|
||||
* @returns True if this Location is less than the given Location, false
|
||||
* @returns True if this Location is less than the given Location, false
|
||||
* otherwise.
|
||||
*/
|
||||
LOOT_API bool operator<(const Location& rhs) const;
|
||||
@@ -89,7 +90,7 @@ private:
|
||||
LOOT_API bool operator!=(const Location& lhs, const Location& rhs);
|
||||
|
||||
/**
|
||||
* Check if the first Location object is greater than the second Location
|
||||
* Check if the first Location object is greater than the second Location
|
||||
* object.
|
||||
* @returns True if the second Location object is less than the first Location
|
||||
* object, false otherwise.
|
||||
@@ -97,17 +98,17 @@ LOOT_API bool operator!=(const Location& lhs, const Location& rhs);
|
||||
LOOT_API bool operator>(const Location& lhs, const Location& rhs);
|
||||
|
||||
/**
|
||||
* Check if the first Location object is less than or equal to the second
|
||||
* Check if the first Location object is less than or equal to the second
|
||||
* Location object.
|
||||
* @returns True if the first Location object is not greater than the second
|
||||
* @returns True if the first Location object is not greater than the second
|
||||
* Location object, false otherwise.
|
||||
*/
|
||||
LOOT_API bool operator<=(const Location& lhs, const Location& rhs);
|
||||
|
||||
/**
|
||||
* Check if the first Location object is greater than or equal to the second
|
||||
* Check if the first Location object is greater than or equal to the second
|
||||
* Location object.
|
||||
* @returns True if the first Location object is not less than the second
|
||||
* @returns True if the first Location object is not less than the second
|
||||
* Location object, false otherwise.
|
||||
*/
|
||||
LOOT_API bool operator>=(const Location& lhs, const Location& rhs);
|
||||
|
||||
@@ -58,8 +58,8 @@ public:
|
||||
* @return A Message object.
|
||||
*/
|
||||
LOOT_API explicit Message(const MessageType type,
|
||||
const std::string& content,
|
||||
const std::string& condition = "");
|
||||
const std::string& content,
|
||||
const std::string& condition = "");
|
||||
|
||||
/**
|
||||
* Construct a Message object with the given type, content and condition
|
||||
@@ -73,8 +73,8 @@ public:
|
||||
* @return A Message object.
|
||||
*/
|
||||
LOOT_API explicit Message(const MessageType type,
|
||||
const std::vector<MessageContent>& content,
|
||||
const std::string& condition = "");
|
||||
const std::vector<MessageContent>& content,
|
||||
const std::string& condition = "");
|
||||
|
||||
/**
|
||||
* Construct a Message object from a SimpleMessage object.
|
||||
@@ -117,7 +117,8 @@ public:
|
||||
* @return A MessageContent object for the preferred language, or for English
|
||||
* if a MessageContent object is not available for the given language.
|
||||
*/
|
||||
LOOT_API std::optional<MessageContent> GetContent(const std::string& language) const;
|
||||
LOOT_API std::optional<MessageContent> GetContent(
|
||||
const std::string& language) const;
|
||||
|
||||
/**
|
||||
* Get the message as a SimpleMessage given a language.
|
||||
@@ -126,7 +127,8 @@ public:
|
||||
* @return A SimpleMessage object for the preferred language, or for English
|
||||
* if message text is not available for the given language.
|
||||
*/
|
||||
LOOT_API std::optional<SimpleMessage> ToSimpleMessage(const std::string& language) const;
|
||||
LOOT_API std::optional<SimpleMessage> ToSimpleMessage(
|
||||
const std::string& language) const;
|
||||
|
||||
private:
|
||||
MessageType type_;
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
#ifndef LOOT_METADATA_MESSAGE_CONTENT
|
||||
#define LOOT_METADATA_MESSAGE_CONTENT
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <optional>
|
||||
|
||||
#include "loot/api_decorator.h"
|
||||
|
||||
@@ -56,8 +56,9 @@ public:
|
||||
* The language that the message is written in.
|
||||
* @return A MessageContent object.
|
||||
*/
|
||||
LOOT_API explicit MessageContent(const std::string& text,
|
||||
const std::string& language = defaultLanguage);
|
||||
LOOT_API explicit MessageContent(
|
||||
const std::string& text,
|
||||
const std::string& language = defaultLanguage);
|
||||
|
||||
/**
|
||||
* Get the message text.
|
||||
|
||||
@@ -76,12 +76,13 @@ public:
|
||||
* The number of deleted navmeshes found in the plugin.
|
||||
* @return A PluginCleaningData object.
|
||||
*/
|
||||
LOOT_API explicit PluginCleaningData(uint32_t crc,
|
||||
const std::string& utility,
|
||||
const std::vector<MessageContent>& detail,
|
||||
unsigned int itm,
|
||||
unsigned int ref,
|
||||
unsigned int nav);
|
||||
LOOT_API explicit PluginCleaningData(
|
||||
uint32_t crc,
|
||||
const std::string& utility,
|
||||
const std::vector<MessageContent>& detail,
|
||||
unsigned int itm,
|
||||
unsigned int ref,
|
||||
unsigned int nav);
|
||||
/**
|
||||
* A less-than operator implemented with no semantics so that
|
||||
* PluginCleaningData objects can be stored in sets.
|
||||
@@ -144,7 +145,8 @@ public:
|
||||
* @return The MessageContent object for the preferred language, or if one
|
||||
* does not exist, the English-language MessageContent object.
|
||||
*/
|
||||
LOOT_API std::optional<MessageContent> ChooseDetail(const std::string& language) const;
|
||||
LOOT_API std::optional<MessageContent> ChooseDetail(
|
||||
const std::string& language) const;
|
||||
|
||||
private:
|
||||
uint32_t crc_;
|
||||
|
||||
@@ -95,15 +95,15 @@ LOOT_API bool operator!=(const Tag& lhs, const Tag& rhs);
|
||||
|
||||
/**
|
||||
* Check if the first Tag object is greater than the second Tag object.
|
||||
* @returns True if the second Tag object is less than the first Tag object,
|
||||
* @returns True if the second Tag object is less than the first Tag object,
|
||||
* false otherwise.
|
||||
*/
|
||||
LOOT_API bool operator>(const Tag& lhs, const Tag& rhs);
|
||||
|
||||
/**
|
||||
* Check if the first Tag object is less than or equal to the second Tag
|
||||
* Check if the first Tag object is less than or equal to the second Tag
|
||||
* object.
|
||||
* @returns True if the first Tag object is not greater than the second Tag
|
||||
* @returns True if the first Tag object is not greater than the second Tag
|
||||
* object, false otherwise.
|
||||
*/
|
||||
LOOT_API bool operator<=(const Tag& lhs, const Tag& rhs);
|
||||
@@ -111,7 +111,7 @@ LOOT_API bool operator<=(const Tag& lhs, const Tag& rhs);
|
||||
/**
|
||||
* Check if the first Tag object is greater than or equal to the second Tag
|
||||
* object.
|
||||
* @returns True if the first Tag object is not less than the second Tag
|
||||
* @returns True if the first Tag object is not less than the second Tag
|
||||
* object, false otherwise.
|
||||
*/
|
||||
LOOT_API bool operator>=(const Tag& lhs, const Tag& rhs);
|
||||
|
||||
Reference in New Issue
Block a user