Skip to content

Commit f679234

Browse files
committed
account for change in Ir constructor signature when reading in Ir for message in IrCollection.
1 parent dd8ec1f commit f679234

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/cpp98/SbeOtfDecoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class IrRepo : public IrCollection, public Ir::Callback
4747

4848
virtual Ir *irForTemplateId(const int templateId, const int schemaVersion)
4949
{
50-
std::cout << "Message lookup id=" << templateId << " version " << schemaVersion << " offset " << listener_.bufferOffset() << std::endl;
50+
std::cout << "Message lookup id=" << templateId << " version=" << schemaVersion << " offset " << listener_.bufferOffset() << std::endl;
5151

5252
// lookup in IrCollection the IR for the template ID and version
5353
return (Ir *)IrCollection::message(templateId, schemaVersion);

main/cpp/otf_api/IrCollection.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ class IrCollection
294294
{
295295
std::cout << " Message name=\"" << std::string(name, nameLen) << "\"";
296296
std::cout << " id=\"" << token.fieldId() << "\"";
297-
std::cout << " version=\"" << token.sbeSchemaVersion() << "\"";
297+
std::cout << " version=\"" << (int)token.sbeSchemaVersion() << "\"";
298298
}
299299

300300
if (token.signal() == SignalCodec::END_MESSAGE)
@@ -307,7 +307,7 @@ class IrCollection
307307

308308
// save buffer_ + offset as start of message and size as length
309309

310-
map_.insert(std::pair<int, Ir *>(token.fieldId(), new Ir(buffer_ + offset, size, token.sbeSchemaId(), token.tokenVersion())));
310+
map_.insert(std::pair<int, Ir *>(token.fieldId(), new Ir(buffer_ + offset, size, token.fieldId(), token.sbeSchemaId(), token.tokenVersion())));
311311

312312
// map_[token.schemaID()] = new Ir(buffer_ + offset, size);
313313

0 commit comments

Comments
 (0)