Skip to content

Commit

Permalink
FieldsChunkSerializer: Replaced PRIi64 with PRId64 for windows cross …
Browse files Browse the repository at this point in the history
…compilation.
  • Loading branch information
levy committed May 15, 2023
1 parent e3bda75 commit 1a6e3a7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/inet/common/packet/serializer/FieldsChunkSerializer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void FieldsChunkSerializer::serialize(MemoryOutputStream& stream, const Ptr<cons
ChunkSerializer::totalSerializedLength += chunkStream.getLength();
}
else if (fieldsChunk->getSerializedBytes() != nullptr) {
CHUNK_CHECK_USAGE(B(fieldsChunk->getSerializedBytes()->size()) == chunk->getChunkLength(), "serialized length is incorrect: serialized=%" PRIzu ", chunk=%" PRIi64, fieldsChunk->getSerializedBytes()->size(), B(chunk->getChunkLength()).get());
CHUNK_CHECK_USAGE(B(fieldsChunk->getSerializedBytes()->size()) == chunk->getChunkLength(), "serialized length is incorrect: serialized=%" PRIzu ", chunk=%" PRId64, fieldsChunk->getSerializedBytes()->size(), B(chunk->getChunkLength()).get());
stream.writeBytes(*fieldsChunk->getSerializedBytes(), offset, length);
}
else if (offset == b(0) && length == chunk->getChunkLength()) {
Expand All @@ -38,7 +38,7 @@ void FieldsChunkSerializer::serialize(MemoryOutputStream& stream, const Ptr<cons
auto serializedBytes = new std::vector<uint8_t>();
stream.copyData(*serializedBytes, startPosition, serializedLength);
fieldsChunk->setSerializedBytes(serializedBytes);
CHUNK_CHECK_USAGE(B(serializedBytes->size()) == chunk->getChunkLength(), "serialized length is incorrect: serialized=%" PRIzu ", chunk=%" PRIi64, serializedBytes->size(), B(chunk->getChunkLength()).get());
CHUNK_CHECK_USAGE(B(serializedBytes->size()) == chunk->getChunkLength(), "serialized length is incorrect: serialized=%" PRIzu ", chunk=%" PRId64, serializedBytes->size(), B(chunk->getChunkLength()).get());
}
else {
MemoryOutputStream chunkStream(fieldsChunk->getChunkLength());
Expand All @@ -48,7 +48,7 @@ void FieldsChunkSerializer::serialize(MemoryOutputStream& stream, const Ptr<cons
auto serializedBytes = new std::vector<uint8_t>();
chunkStream.copyData(*serializedBytes);
fieldsChunk->setSerializedBytes(serializedBytes);
CHUNK_CHECK_USAGE(B(serializedBytes->size()) == chunk->getChunkLength(), "serialized length is incorrect: serialized=%" PRIzu ", chunk=%" PRIi64, serializedBytes->size(), B(chunk->getChunkLength()).get());
CHUNK_CHECK_USAGE(B(serializedBytes->size()) == chunk->getChunkLength(), "serialized length is incorrect: serialized=%" PRIzu ", chunk=%" PRId64, serializedBytes->size(), B(chunk->getChunkLength()).get());
}
}

Expand All @@ -63,7 +63,7 @@ const Ptr<Chunk> FieldsChunkSerializer::deserialize(MemoryInputStream& stream, c
auto serializedBytes = new std::vector<uint8_t>();
stream.copyData(*serializedBytes, startPosition, chunkLength);
fieldsChunk->setSerializedBytes(serializedBytes);
CHUNK_CHECK_USAGE(B(serializedBytes->size()) == fieldsChunk->getChunkLength(), "serialized length is incorrect: serialized=%" PRIzu ", chunk=%" PRIi64, serializedBytes->size(), B(fieldsChunk->getChunkLength()).get());
CHUNK_CHECK_USAGE(B(serializedBytes->size()) == fieldsChunk->getChunkLength(), "serialized length is incorrect: serialized=%" PRIzu ", chunk=%" PRId64, serializedBytes->size(), B(fieldsChunk->getChunkLength()).get());
return fieldsChunk;
}

Expand Down

0 comments on commit 1a6e3a7

Please sign in to comment.