mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 18:35:35 +08:00
refs #937 Resolved clazy warnings: unnecessary memory allocation.
This commit is contained in:
@@ -488,12 +488,13 @@ namespace BlackCore
|
||||
|
||||
CTextMessageList radioMessages = messages.getRadioMessages();
|
||||
radioMessages.markAsSent();
|
||||
QVector<int> freqsVec;
|
||||
for (const auto &message : radioMessages)
|
||||
{
|
||||
// I could send the same message to n frequencies in one step
|
||||
// if this is really required, I need to group by message
|
||||
// currently I send individual messages
|
||||
QVector<int> freqsVec;
|
||||
freqsVec.clear();
|
||||
freqsVec.push_back(message.getFrequency().valueRounded(CFrequencyUnit::kHz(), 0));
|
||||
Vat_SendRadioMessage(m_net.data(), freqsVec.data(), freqsVec.size(), toFSD(message.getMessage()));
|
||||
emit textMessageSent(message);
|
||||
|
||||
@@ -263,8 +263,8 @@ namespace BlackCore
|
||||
{
|
||||
// ; !CLIENTS section
|
||||
int i = currentLine.lastIndexOf(' ');
|
||||
const QString attributes = currentLine.mid(i).trimmed();
|
||||
clientSectionAttributes = attributes.split(':', QString::SkipEmptyParts);
|
||||
const QVector<QStringRef> attributes = currentLine.midRef(i).trimmed().split(':', QString::SkipEmptyParts);
|
||||
for (const QStringRef &attr : attributes) { clientSectionAttributes.push_back(attr.toString()); }
|
||||
section = SectionNone; // reset
|
||||
}
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user