mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fix use of inline/static
Some instances of both were unnecessary, some statics were turned into inlines.
This commit is contained in:
@@ -37,14 +37,14 @@ namespace loot {
|
||||
/* The string below matches timestamps that use forwardslashes for date
|
||||
separators. However, Pseudosem v1.0.1 will only compare the first
|
||||
two digits as it does not recognise forwardslashes as separators. */
|
||||
static constexpr const char* dateRegex =
|
||||
constexpr const char* dateRegex =
|
||||
R"((\d{1,2}/\d{1,2}/\d{1,4} \d{1,2}:\d{1,2}:\d{1,2}))";
|
||||
|
||||
/* The string below matches the range of version strings supported by
|
||||
Pseudosem v1.0.1, excluding space separators, as they make version
|
||||
extraction from inside sentences very tricky and have not been
|
||||
seen "in the wild". */
|
||||
static constexpr const char* pseudosemVersionRegex =
|
||||
constexpr const char* pseudosemVersionRegex =
|
||||
R"((\d+(?:\.\d+)+(?:[-._:]?[A-Za-z0-9]+)*))"
|
||||
// The string below prevents version numbers followed by a comma from
|
||||
// matching.
|
||||
@@ -53,7 +53,7 @@ static constexpr const char* pseudosemVersionRegex =
|
||||
/* The string below matches a number containing one or more
|
||||
digits found at the start of the search string or preceded by
|
||||
'v' or 'version:. */
|
||||
static constexpr const char* digitsVersionRegex = R"((?:^|v|version:\s*)(\d+))";
|
||||
constexpr const char* digitsVersionRegex = R"((?:^|v|version:\s*)(\d+))";
|
||||
|
||||
std::vector<Tag> ExtractBashTags(const std::string& description) {
|
||||
std::vector<Tag> tags;
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
#include "loot/metadata/tag.h"
|
||||
|
||||
namespace loot {
|
||||
static constexpr const char* GHOST_FILE_EXTENSION = ".ghost";
|
||||
static constexpr std::size_t GHOST_FILE_EXTENSION_LENGTH =
|
||||
inline constexpr const char* GHOST_FILE_EXTENSION = ".ghost";
|
||||
inline constexpr std::size_t GHOST_FILE_EXTENSION_LENGTH =
|
||||
std::char_traits<char>::length(GHOST_FILE_EXTENSION);
|
||||
|
||||
std::vector<Tag> ExtractBashTags(const std::string& description);
|
||||
|
||||
@@ -37,7 +37,7 @@ protected:
|
||||
savedMetadataPath(metadataFilesPath / "saved.masterlist.yaml"),
|
||||
missingMetadataPath(metadataFilesPath / "missing-metadata.yaml") {}
|
||||
|
||||
inline void SetUp() override {
|
||||
void SetUp() override {
|
||||
CommonGameTestFixture::SetUp();
|
||||
|
||||
using std::filesystem::copy;
|
||||
@@ -55,7 +55,7 @@ protected:
|
||||
out << R"(bash_tags:
|
||||
- 'C.Climate'
|
||||
- 'Relev'
|
||||
|
||||
|
||||
groups:
|
||||
- name: group1
|
||||
after:
|
||||
|
||||
@@ -211,7 +211,7 @@ protected:
|
||||
return actual;
|
||||
}
|
||||
|
||||
inline std::vector<std::pair<std::string, bool>> getInitialLoadOrder() const {
|
||||
std::vector<std::pair<std::string, bool>> getInitialLoadOrder() const {
|
||||
auto loadOrder = std::vector<std::pair<std::string, bool>>({
|
||||
{masterFile, true},
|
||||
{blankEsm, true},
|
||||
@@ -276,7 +276,7 @@ protected:
|
||||
const uint32_t blankEsmCrc;
|
||||
|
||||
private:
|
||||
inline std::string getMasterFile() const {
|
||||
std::string getMasterFile() const {
|
||||
if (GetParam() == GameType::tes3)
|
||||
return "Morrowind.esm";
|
||||
else if (GetParam() == GameType::tes4)
|
||||
@@ -299,7 +299,7 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
inline uint32_t getBlankEsmCrc() const {
|
||||
uint32_t getBlankEsmCrc() const {
|
||||
switch (GetParam()) {
|
||||
case GameType::tes3:
|
||||
return 0x790DC6FB;
|
||||
@@ -353,7 +353,7 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
inline static bool isLoadOrderTimestampBased(GameType gameType) {
|
||||
static bool isLoadOrderTimestampBased(GameType gameType) {
|
||||
return gameType == GameType::tes3 || gameType == GameType::tes4 ||
|
||||
gameType == GameType::fo3 || gameType == GameType::fonv;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user