Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit f5c23873 authored by g4m4's avatar g4m4
Browse files

[CODE] Update validity check

parent 64e9e6f0
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "FixItCore.h" // LogFixItCore #include "FixItCore.h" // LogFixItCore
#include "FixItPlayerDataBase.h" #include "FixItPlayerDataBase.h"
#include "FixItSettings.h"
#include "FixItTranslationLayer.h" #include "FixItTranslationLayer.h"
THIRD_PARTY_INCLUDES_START THIRD_PARTY_INCLUDES_START
...@@ -19,7 +20,14 @@ THIRD_PARTY_INCLUDES_START ...@@ -19,7 +20,14 @@ THIRD_PARTY_INCLUDES_START
#include "fixit/data/player_data.h" #include "fixit/data/player_data.h"
THIRD_PARTY_INCLUDES_END THIRD_PARTY_INCLUDES_END
bool FFixItBugRequestData::IsValid() const {
const UFixItSettings *Settings = GetDefault<UFixItSettings>();
if (Settings != nullptr) {
return (!Settings->bTitleIsMandatory || !Title.IsEmpty()) &&
(!Settings->bContentIsMandatory || !Content.IsEmpty());
} }
return !Title.IsEmpty() && !Content.IsEmpty();
}
#if PLATFORM_WINDOWS #if PLATFORM_WINDOWS
namespace { namespace {
...@@ -51,11 +59,6 @@ namespace { ...@@ -51,11 +59,6 @@ namespace {
return Out; return Out;
} }
bool FFixItBugRequestData::IsValid() const
{
return !Title.IsEmpty()
&& !Content.IsEmpty();
}
} // namespace } // namespace
fixit::BugRequestData FFixItBugRequestData::ConvertTo() const fixit::BugRequestData FFixItBugRequestData::ConvertTo() const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment