From 75e6da8903b6cdcccdd6e513958a75de6bc559ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 1 Jan 2019 21:45:53 +0100 Subject: [PATCH] Fixed build with older Google protocol buffers --- src/pbf.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pbf.cpp b/src/pbf.cpp index 2851ffb..e9ba64e 100644 --- a/src/pbf.cpp +++ b/src/pbf.cpp @@ -47,12 +47,10 @@ const QVariant *PBF::Feature::value(const QString &key) const if (it == keys.constEnd()) return 0; - const google::protobuf::RepeatedField - &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; }