Skip to content

Commit

Permalink
Start out Array with zero size, because we don't known how large it w…
Browse files Browse the repository at this point in the history
…ill be.
  • Loading branch information
joto committed Nov 6, 2015
1 parent 573a65c commit 126ea3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/osm_way_wrap.cpp
Expand Up @@ -121,7 +121,7 @@ namespace node_osmium {
switch (args.Length()) {
case 0: {
try {
v8::Local<v8::Array> nodes = v8::Array::New(way.nodes().size());
v8::Local<v8::Array> nodes = v8::Array::New(0);
int i = 0;
osmium::Location last_location;
for (const auto& node_ref : way.nodes()) {
Expand Down

0 comments on commit 126ea3e

Please sign in to comment.