Fixed flatbufferbuiler copy issues.

Compiling under gcc9.1 we get copy issues.
It appears we shouldn't pass builder classes by value, only ref.
This commit is contained in:
Tom Peoples
2019-09-26 17:36:31 +10:00
parent 018a9bc804
commit 28895373fb
6 changed files with 46 additions and 46 deletions
+2 -2
View File
@@ -236,7 +236,7 @@ class TableAPI final : public BaseAPI
boost::range::transform(
phantoms, std::back_inserter(waypoints), [this, &builder](const PhantomNode &phantom) {
return BaseAPI::MakeWaypoint(builder, phantom).Finish();
return BaseAPI::MakeWaypoint(&builder, phantom)->Finish();
});
return builder.CreateVector(waypoints);
}
@@ -252,7 +252,7 @@ class TableAPI final : public BaseAPI
std::back_inserter(waypoints),
[this, &builder, phantoms](const std::size_t idx) {
BOOST_ASSERT(idx < phantoms.size());
return BaseAPI::MakeWaypoint(builder, phantoms[idx]).Finish();
return BaseAPI::MakeWaypoint(&builder, phantoms[idx])->Finish();
});
return builder.CreateVector(waypoints);
}