Remove commented out dead code in BondSplicer.cpp
This commit is contained in:
Родитель
a19365ecab
Коммит
583f359ded
|
@ -43,58 +43,24 @@ std::vector<uint8_t> BondSplicer::splice() const
|
|||
std::vector<uint8_t> output;
|
||||
bond_lite::CompactBinaryProtocolWriter writer(output);
|
||||
|
||||
// ClientToCollectorRequest
|
||||
//writer.WriteStructBegin(nullptr, false);
|
||||
|
||||
// 1: optional vector<DataPackage> DataPackages
|
||||
//writer.WriteFieldOmitted(bond_lite::BT_LIST, 1, nullptr);
|
||||
|
||||
// 2: optional int32 RequestRetryCount
|
||||
//writer.WriteFieldOmitted(bond_lite::BT_INT32, 2, nullptr);
|
||||
|
||||
// 3: optional map<string, vector<DataPackage>> TokenToDataPackagesMap
|
||||
if (!m_packages.empty()) {
|
||||
//writer.WriteFieldBegin(bond_lite::BT_MAP, 3, nullptr);
|
||||
//writer.WriteMapContainerBegin(m_packages.size(), bond_lite::BT_STRING, bond_lite::BT_LIST);
|
||||
|
||||
for (PackageInfo const& package : m_packages) {
|
||||
// Key (string)
|
||||
//writer.WriteString(package.tenantToken);
|
||||
|
||||
// Value (vector<DataPackage>)
|
||||
//writer.WriteContainerBegin(1, bond_lite::BT_STRUCT);
|
||||
//writer.WriteBlob(m_buffer.data() + package.header.offset, package.header.length - 1);
|
||||
|
||||
// 8: optional vector<Record> Records
|
||||
if (!package.records.empty()) {
|
||||
//writer.WriteFieldBegin(bond_lite::BT_LIST, 8, nullptr);
|
||||
//writer.WriteContainerBegin(package.records.size(), bond_lite::BT_STRUCT);
|
||||
|
||||
for (Span const& record : package.records) {
|
||||
writer.WriteBlob(m_buffer.data() + record.offset, record.length);
|
||||
}
|
||||
|
||||
//writer.WriteFieldEnd();
|
||||
}
|
||||
else
|
||||
{
|
||||
//writer.WriteFieldOmitted(bond_lite::BT_LIST, 8, nullptr);
|
||||
}
|
||||
|
||||
//writer.WriteStructEnd(false);
|
||||
|
||||
//writer.WriteContainerEnd();
|
||||
}
|
||||
|
||||
//writer.WriteContainerEnd();
|
||||
//writer.WriteFieldEnd();
|
||||
}
|
||||
else
|
||||
{
|
||||
//writer.WriteFieldOmitted(bond_lite::BT_MAP, 3, nullptr);
|
||||
}
|
||||
|
||||
//writer.WriteStructEnd(false);
|
||||
return output;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче