Reputation: 163
How to convert a RepeatedField<google::protobuf::uint32>
to a const std::vector<double>
?
Upvotes: 4
Views: 12591
Reputation: 476930
That should be easy, since repeated fields act as containers:
void foo(RepeatedField<google::protobuf::uint32> const & f)
{
std::vector<double> v(f.begin(), f.end());
// use v
}
Upvotes: 15