[postgis-tickets] [SCM] PostGIS branch master updated. 3.2.0beta2-3-geda70258f
git at osgeo.org
git at osgeo.org
Sat Nov 27 06:43:55 PST 2021
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, master has been updated
via eda70258f373c1ad88e1851f194c891ad8d9aff4 (commit)
via 30aa9a1fd898221ee9f6f60485808fd5a7fb7744 (commit)
from 04efca94ad4f2cdf62a3116c7e904204365b6400 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit eda70258f373c1ad88e1851f194c891ad8d9aff4
Merge: 04efca94a 30aa9a1fd
Author: bjornharrtell <bjorn at wololo.org>
Date: Sat Nov 27 06:43:54 2021 -0800
Merge pull request 'Fix use of vector after out of local scope' (!63) from bjornharrtell/postgis:issue-5014 into master
Reviewed-on: https://git.osgeo.org/gitea/postgis/postgis/pulls/63
commit 30aa9a1fd898221ee9f6f60485808fd5a7fb7744
Author: Björn Harrtell <bjorn at wololo.org>
Date: Sat Nov 27 15:41:11 2021 +0100
Fix use of vector after out of local scope
diff --git a/deps/flatgeobuf/flatgeobuf_c.cpp b/deps/flatgeobuf/flatgeobuf_c.cpp
index e71a927b0..2ef2dd401 100644
--- a/deps/flatgeobuf/flatgeobuf_c.cpp
+++ b/deps/flatgeobuf/flatgeobuf_c.cpp
@@ -70,7 +70,6 @@ int flatgeobuf_encode_header(ctx *ctx)
columns.push_back(CreateColumnDirect(fbb, c->name, (ColumnType) c->type));
}
}
-
if (columns.size() > 0)
pColumns = &columns;
@@ -78,11 +77,16 @@ int flatgeobuf_encode_header(ctx *ctx)
if (ctx->srid > 0)
crs = CreateCrsDirect(fbb, nullptr, ctx->srid);
+ std::vector<double> envelope;
std::vector<double> *pEnvelope = nullptr;
if (ctx->has_extent) {
- std::vector<double> envelope = { ctx->xmin, ctx->ymin, ctx->xmax, ctx->ymax };
- pEnvelope = &envelope;
+ envelope.push_back(ctx->xmin);
+ envelope.push_back(ctx->ymin);
+ envelope.push_back(ctx->xmax);
+ envelope.push_back(ctx->ymax);
}
+ if (envelope.size() > 0)
+ pEnvelope = &envelope;
const auto header = CreateHeaderDirect(
fbb, ctx->name, pEnvelope, (GeometryType) ctx->geometry_type, ctx->has_z, ctx->has_m, ctx->has_t, ctx->has_tm, pColumns, ctx->features_count, ctx->index_node_size, crs);
-----------------------------------------------------------------------
Summary of changes:
deps/flatgeobuf/flatgeobuf_c.cpp | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list