format and apply the sugestion
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
b3b2e9df35
commit
71890707c0
@ -24,14 +24,11 @@
|
||||
|
||||
namespace ModPlatform {
|
||||
|
||||
static const QMap<QString, IndexedVersionType::Enum> s_indexed_version_type_names = {
|
||||
{"release", IndexedVersionType::Enum::Release},
|
||||
{"beta", IndexedVersionType::Enum::Beta},
|
||||
{"alpha", IndexedVersionType::Enum::Alpha}
|
||||
};
|
||||
static const QMap<QString, IndexedVersionType::Enum> s_indexed_version_type_names = { { "release", IndexedVersionType::Enum::Release },
|
||||
{ "beta", IndexedVersionType::Enum::Beta },
|
||||
{ "alpha", IndexedVersionType::Enum::Alpha } };
|
||||
|
||||
IndexedVersionType::IndexedVersionType(const QString& type): IndexedVersionType(enumFromString(type))
|
||||
{}
|
||||
IndexedVersionType::IndexedVersionType(const QString& type) : IndexedVersionType(enumFromString(type)) {}
|
||||
|
||||
IndexedVersionType::IndexedVersionType(int type)
|
||||
{
|
||||
@ -66,7 +63,7 @@ IndexedVersionType& IndexedVersionType::operator=(const IndexedVersionType& othe
|
||||
return *this;
|
||||
}
|
||||
|
||||
const QString IndexedVersionType::toString (const IndexedVersionType::Enum& type)
|
||||
const QString IndexedVersionType::toString(const IndexedVersionType::Enum& type)
|
||||
{
|
||||
switch (type) {
|
||||
case IndexedVersionType::Enum::Release:
|
||||
@ -78,18 +75,12 @@ const QString IndexedVersionType::toString (const IndexedVersionType::Enum& type
|
||||
case IndexedVersionType::Enum::UNKNOWN:
|
||||
default:
|
||||
return "unknown";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
IndexedVersionType::Enum IndexedVersionType::enumFromString(const QString& type)
|
||||
{
|
||||
auto found = s_indexed_version_type_names.constFind(type);
|
||||
if (found != s_indexed_version_type_names.constEnd()) {
|
||||
return *found;
|
||||
} else {
|
||||
return IndexedVersionType::Enum::UNKNOWN;
|
||||
}
|
||||
return s_indexed_version_type_names.value(type, IndexedVersionType::Enum::UNKNOWN);
|
||||
}
|
||||
|
||||
auto ProviderCapabilities::name(ResourceProvider p) -> const char*
|
||||
|
Loading…
Reference in New Issue
Block a user