mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
[FSD] use Serializer::fromQString function, to static_cast
see https://discordapp.com/channels/539048679160676382/539925070550794240/694955298217263124
This commit is contained in:
committed by
Mat Sutcliffe
parent
81049cd835
commit
5eaa8db1a2
@@ -48,8 +48,8 @@ namespace BlackCore
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
AtcRating rating = static_cast<AtcRating>(tokens[5].toInt());
|
const AtcRating rating = fromQString<AtcRating>(tokens[5]);
|
||||||
int protocolRevision = tokens[6].toInt();
|
const int protocolRevision = tokens[6].toInt();
|
||||||
return AddAtc(tokens[0], tokens[2], tokens[3], tokens[4], rating, protocolRevision);
|
return AddAtc(tokens[0], tokens[2], tokens[3], tokens[4], rating, protocolRevision);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,10 +46,10 @@ namespace BlackCore
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
PilotRating rating = static_cast<PilotRating>(tokens[4].toInt());
|
const PilotRating rating = fromQString<PilotRating>(tokens[4]);
|
||||||
int protocolRevision = tokens[5].toInt();
|
const int protocolRevision = tokens[5].toInt();
|
||||||
SimType simType = static_cast<SimType>(tokens[6].toInt());
|
const SimType simType = fromQString<SimType>(tokens[6]);
|
||||||
AddPilot packet(tokens[0], tokens[2], tokens[3], rating, protocolRevision, simType, tokens[7]);
|
const AddPilot packet(tokens[0], tokens[2], tokens[3], rating, protocolRevision, simType, tokens[7]);
|
||||||
return packet;
|
return packet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
#include "blackmisc/logmessage.h"
|
#include "blackmisc/logmessage.h"
|
||||||
|
|
||||||
|
using namespace BlackMisc;
|
||||||
using namespace BlackMisc::Aviation;
|
using namespace BlackMisc::Aviation;
|
||||||
|
|
||||||
namespace BlackCore
|
namespace BlackCore
|
||||||
@@ -61,7 +62,7 @@ namespace BlackCore
|
|||||||
{
|
{
|
||||||
if (tokens.size() < 10)
|
if (tokens.size() < 10)
|
||||||
{
|
{
|
||||||
BlackMisc::CLogMessage(static_cast<PilotDataUpdate *>(nullptr)).debug(u"Wrong number of arguments.");
|
CLogMessage(static_cast<PilotDataUpdate *>(nullptr)).debug(u"Wrong number of arguments.");
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user