more uses of unionDiscrim.set

This commit is contained in:
David Renshaw 2014-05-21 21:06:18 -04:00
parent 9f368ff3ec
commit d3aff83097

View file

@ -796,10 +796,13 @@ private:
spaces(indent), " }\n",
(typeBody.which() == schema::Type::VOID ?
kj::strTree(spaces(indent), " public final void set", titleCase, "() {}\n") :
kj::strTree(spaces(indent), " public final void set", titleCase, "() {\n",
unionDiscrim.set,
spaces(indent), " }\n") :
(typeBody.which() == schema::Type::ENUM ?
kj::strTree(
spaces(indent), " public final void set", titleCase, "(", type, " value) {\n",
unionDiscrim.set,
spaces(indent), " _builder.setShortField(", offset, ", (short)value.ordinal());\n",
spaces(indent), " }\n") :
kj::strTree(