mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
Added with() and withValidation() methods in CLogCategoryList.
This commit is contained in:
@@ -781,7 +781,7 @@ namespace BlackMisc
|
||||
|
||||
CStatusMessageList CAircraftModel::validate(bool withNestedObjects) const
|
||||
{
|
||||
static const CLogCategoryList cats(CLogCategoryList(this).join({ CLogCategory::validation() }));
|
||||
static const CLogCategoryList cats(CLogCategoryList(this).withValidation());
|
||||
CStatusMessageList msgs;
|
||||
if (!hasModelString()) { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, u"Model: missing model string (aka key)")); }
|
||||
if (!hasValidSimulator()) {msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, u"Model: no simulator set")); }
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace BlackMisc
|
||||
|
||||
CStatusMessageList CDistributor::validate() const
|
||||
{
|
||||
static const CLogCategoryList cats(CLogCategoryList(this).join({ CLogCategory::validation() }));
|
||||
static const CLogCategoryList cats(CLogCategoryList(this).withValidation());
|
||||
CStatusMessageList msgs;
|
||||
if (!hasValidDbKey()) { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, u"Distributor: missing id")); }
|
||||
if (!hasDescription()) { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, u"Distributor: missing description")); }
|
||||
|
||||
Reference in New Issue
Block a user