diff --git a/include/osi-utilities/tracefile/NativeBinaryTraceFileReader.h b/include/osi-utilities/tracefile/NativeBinaryTraceFileReader.h index 6464d12..920ae38 100644 --- a/include/osi-utilities/tracefile/NativeBinaryTraceFileReader.h +++ b/include/osi-utilities/tracefile/NativeBinaryTraceFileReader.h @@ -63,7 +63,7 @@ class NativeBinaryTraceFileReader final : public osi3::TraceFileReader { std::vector ReadNextMessageFromFile(); template - std::unique_ptr ParseMessage(const std::string& data) { + std::unique_ptr ParseMessage(const std::vector& data) { auto msg = std::make_unique(); if (!msg->ParseFromArray(data.data(), static_cast(data.size()))) { throw std::runtime_error("Failed to parse message"); diff --git a/src/tracefile/NativeBinaryTraceFileReader.cpp b/src/tracefile/NativeBinaryTraceFileReader.cpp index e30ee70..b020408 100644 --- a/src/tracefile/NativeBinaryTraceFileReader.cpp +++ b/src/tracefile/NativeBinaryTraceFileReader.cpp @@ -8,8 +8,6 @@ #include #include -#include "google/protobuf/descriptor.pb.h" - namespace osi3 { bool NativeBinaryTraceFileReader::Open(const std::string& filename, const ReaderTopLevelMessage message_type) { @@ -47,7 +45,7 @@ bool NativeBinaryTraceFileReader::Open(const std::string& filename) { return false; } - parser_ = kParserMap.at(message_type_); + parser_ = kParserMap_.at(message_type_); trace_file_ = std::ifstream(filename, std::ios::binary); if (!trace_file_) {