Skip to content

Commit

Permalink
AVRO-3617: compiler with auto
Browse files Browse the repository at this point in the history
  • Loading branch information
clesaec committed Oct 17, 2022
1 parent 68eccbd commit 16b7175
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lang/c++/impl/Compiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -396,12 +396,12 @@ static NodePtr makeEnumNode(const Entity &e,

static NodePtr makeFixedNode(const Entity &e,
const Name &name, const Object &m) {
size_t v = getLongField(e, m, "size");
auto v = getLongField(e, m, "size");
if (v <= 0) {
throw Exception(boost::format("Size for fixed is not positive: %1%") % e.toString());
}
NodePtr node =
NodePtr(new NodeFixed(asSingleAttribute(name), asSingleAttribute(v)));
NodePtr(new NodeFixed(asSingleAttribute(name), asSingleAttribute(static_cast<size_t>(v))));
if (containsField(m, "doc")) {
node->setDoc(getDocField(e, m));
}
Expand Down

0 comments on commit 16b7175

Please sign in to comment.