change PIMap::at and add const to PIMap and PIBinaryLog

This commit is contained in:
2023-07-13 12:32:45 +03:00
parent 299a009d61
commit 66fb93ba88
3 changed files with 58 additions and 41 deletions

View File

@@ -251,7 +251,7 @@ public:
void setHeader(const PIByteArray & header);
//! Get custom file header
PIByteArray getHeader();
PIByteArray getHeader() const;
#ifdef DOXYGEN
//! Read one message from binlog file, with ID contains in "filterID" or any ID, if "filterID" is empty
@@ -462,9 +462,9 @@ inline PICout operator<<(PICout s, const PIBinaryLog::BinLogInfo & bi) {
}
s << "read records " << bi.records_count << " in " << bi.records.size() << " types, log size " << bi.log_size;
s << "\nlog start " << bi.start_time << " , log end " << bi.end_time;
PIVector<int> keys = bi.records.keys();
const auto keys = bi.records.keys();
for (int i: keys) {
PIBinaryLog::BinLogRecordInfo bri = bi.records.at(i);
const auto & bri(bi.records.at(i));
s << "\n record id " << bri.id << " , count " << bri.count;
s << "\n record start " << bri.start_time << " , end " << bri.end_time;
s << "\n record size " << bri.minimum_size << " - " << bri.maximum_size;