mirror of
https://github.com/tumic0/QtPBFImagePlugin.git
synced 2024-11-23 19:25:55 +01:00
Fixed build with older Google protocol buffers
This commit is contained in:
parent
c8e8f0013f
commit
75e6da8903
@ -47,12 +47,10 @@ const QVariant *PBF::Feature::value(const QString &key) const
|
||||
if (it == keys.constEnd())
|
||||
return 0;
|
||||
|
||||
const google::protobuf::RepeatedField<google::protobuf::uint32>
|
||||
&tags(_data->tags());
|
||||
google::protobuf::uint32 index = *it;
|
||||
for (int i = 0; i < _data->tags_size(); i = i + 2)
|
||||
if (tags[i] == index)
|
||||
return &(_layer->values().at(tags[i+1]));
|
||||
if (_data->tags(i) == index)
|
||||
return &(_layer->values().at(_data->tags(i+1)));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user