Skip to content

Commit

Permalink
additional enum fix for spdlog (for v2.26.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
chengguizi committed Jun 16, 2024
1 parent b38402a commit 096ef99
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pipeline/datatype/StreamMessageParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static std::tuple<DatatypeEnum, size_t, size_t> parseHeader(streamPacketDesc_t*
logger::warn("StreamMessageParser end-of-packet marker mismatch, got: " + hex);
}

const auto info = fmt::format(", total size {}, type {}, metadata size {}", packet->length, objectType, serializedObjectSize);
const auto info = fmt::format(", total size {}, type {}, metadata size {}", packet->length, static_cast<std::int32_t>(objectType), serializedObjectSize);

if(serializedObjectSize < 0) {
throw std::runtime_error("Bad packet, couldn't parse (metadata size negative)" + info);
Expand Down Expand Up @@ -234,7 +234,7 @@ std::shared_ptr<RawBuffer> StreamMessageParser::parseMessage(streamPacketDesc_t*
}

throw std::runtime_error(
fmt::format("Bad packet, couldn't parse, total size {}, type {}, metadata size {}", packet->length, objectType, serializedObjectSize));
fmt::format("Bad packet, couldn't parse, total size {}, type {}, metadata size {}", packet->length, static_cast<std::int32_t>(objectType), serializedObjectSize));
}

std::shared_ptr<ADatatype> StreamMessageParser::parseMessageToADatatype(streamPacketDesc_t* const packet, DatatypeEnum& objectType) {
Expand Down Expand Up @@ -342,7 +342,7 @@ std::shared_ptr<ADatatype> StreamMessageParser::parseMessageToADatatype(streamPa
}

throw std::runtime_error(fmt::format(
"Bad packet, couldn't parse (invalid message type), total size {}, type {}, metadata size {}", packet->length, objectType, serializedObjectSize));
"Bad packet, couldn't parse (invalid message type), total size {}, type {}, metadata size {}", packet->length, static_cast<std::int32_t>(objectType), serializedObjectSize));
}

std::shared_ptr<ADatatype> StreamMessageParser::parseMessageToADatatype(streamPacketDesc_t* const packet) {
Expand Down

0 comments on commit 096ef99

Please sign in to comment.