Explicitly specify 'template ' for fetch_string.
This commit is contained in:
parent
a9d5078f66
commit
98033937cc
@ -201,7 +201,7 @@ Status SessionConnection::parse_message(TlParser &parser, MsgInfo *info, Slice *
|
|||||||
<< "] is not divisible by 4");
|
<< "] is not divisible by 4");
|
||||||
}
|
}
|
||||||
|
|
||||||
*packet = parser.fetch_string_raw<Slice>(bytes);
|
*packet = parser.template fetch_string_raw<Slice>(bytes);
|
||||||
if (parser.get_error() != nullptr) {
|
if (parser.get_error() != nullptr) {
|
||||||
return Status::Error(PSLICE() << "Failed to parse mtproto_api::message: " << parser.get_error());
|
return Status::Error(PSLICE() << "Failed to parse mtproto_api::message: " << parser.get_error());
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ class BusinessConnectionId {
|
|||||||
|
|
||||||
template <class ParserT>
|
template <class ParserT>
|
||||||
void parse(ParserT &parser) {
|
void parse(ParserT &parser) {
|
||||||
business_connection_id_ = parser.fetch_string<string>();
|
business_connection_id_ = parser.template fetch_string<string>();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ void BinlogEvent::init(string raw_event) {
|
|||||||
flags_ = parser.fetch_int();
|
flags_ = parser.fetch_int();
|
||||||
extra_ = static_cast<uint64>(parser.fetch_long());
|
extra_ = static_cast<uint64>(parser.fetch_long());
|
||||||
CHECK(size_ >= MIN_SIZE);
|
CHECK(size_ >= MIN_SIZE);
|
||||||
parser.fetch_string_raw<Slice>(size_ - MIN_SIZE); // skip data
|
parser.template fetch_string_raw<Slice>(size_ - MIN_SIZE); // skip data
|
||||||
crc32_ = static_cast<uint32>(parser.fetch_int());
|
crc32_ = static_cast<uint32>(parser.fetch_int());
|
||||||
raw_event_ = std::move(raw_event);
|
raw_event_ = std::move(raw_event);
|
||||||
}
|
}
|
||||||
@ -43,7 +43,7 @@ Status BinlogEvent::validate() const {
|
|||||||
return Status::Error(PSLICE() << "Size of event changed: " << tag("was", size_) << tag("now", size)
|
return Status::Error(PSLICE() << "Size of event changed: " << tag("was", size_) << tag("now", size)
|
||||||
<< tag("real size", raw_event_.size()));
|
<< tag("real size", raw_event_.size()));
|
||||||
}
|
}
|
||||||
parser.fetch_string_raw<Slice>(size_ - TAIL_SIZE - sizeof(int)); // skip
|
parser.template fetch_string_raw<Slice>(size_ - TAIL_SIZE - sizeof(int)); // skip
|
||||||
auto stored_crc32 = static_cast<uint32>(parser.fetch_int());
|
auto stored_crc32 = static_cast<uint32>(parser.fetch_int());
|
||||||
auto calculated_crc = crc32(Slice(as_slice(raw_event_).data(), size_ - TAIL_SIZE));
|
auto calculated_crc = crc32(Slice(as_slice(raw_event_).data(), size_ - TAIL_SIZE));
|
||||||
if (calculated_crc != crc32_ || calculated_crc != stored_crc32) {
|
if (calculated_crc != crc32_ || calculated_crc != stored_crc32) {
|
||||||
|
@ -125,7 +125,7 @@ int main(int argc, char *argv[]) {
|
|||||||
info[0].compressed_size += event.raw_event_.size();
|
info[0].compressed_size += event.raw_event_.size();
|
||||||
info[event.type_].compressed_size += event.raw_event_.size();
|
info[event.type_].compressed_size += event.raw_event_.size();
|
||||||
if (event.type_ == ConfigPmcMagic || event.type_ == BinlogPmcMagic) {
|
if (event.type_ == ConfigPmcMagic || event.type_ == BinlogPmcMagic) {
|
||||||
auto key = td::TlParser(event.get_data()).fetch_string<td::Slice>();
|
auto key = td::TlParser(event.get_data()).template fetch_string<td::Slice>();
|
||||||
info[event.type_].compressed_trie.add(key);
|
info[event.type_].compressed_trie.add(key);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -134,7 +134,7 @@ int main(int argc, char *argv[]) {
|
|||||||
info[0].full_size += event.raw_event_.size();
|
info[0].full_size += event.raw_event_.size();
|
||||||
info[event.type_].full_size += event.raw_event_.size();
|
info[event.type_].full_size += event.raw_event_.size();
|
||||||
if (event.type_ == ConfigPmcMagic || event.type_ == BinlogPmcMagic) {
|
if (event.type_ == ConfigPmcMagic || event.type_ == BinlogPmcMagic) {
|
||||||
auto key = td::TlParser(event.get_data()).fetch_string<td::Slice>();
|
auto key = td::TlParser(event.get_data()).template fetch_string<td::Slice>();
|
||||||
info[event.type_].trie.add(key);
|
info[event.type_].trie.add(key);
|
||||||
}
|
}
|
||||||
LOG(PLAIN) << "LogEvent[" << td::tag("event_id", td::format::as_hex(event.id_))
|
LOG(PLAIN) << "LogEvent[" << td::tag("event_id", td::format::as_hex(event.id_))
|
||||||
|
Loading…
Reference in New Issue
Block a user