<p></p>
<p><b>@joto</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/osm2pgsql/pull/1168#discussion_r426255520">src/osm2pgsql.cpp</a>:</p>
<pre style='color:#555'>> @@ -63,7 +63,17 @@ int main(int argc, char *argv[])
auto const outputs =
output_t::create_outputs(middle->get_query_instance(), options);
- osmdata_t osmdata{middle, outputs};
+ bool const need_dependencies =
+ std::any_of(outputs.cbegin(), outputs.cend(),
+ [](std::shared_ptr<output_t> const &output) {
+ return output->need_forward_dependencies();
+ });
+
+ auto dependency_manager = std::unique_ptr<dependency_manager_t>(
+ need_dependencies ? new full_dependency_manager_t{middle.get()}
+ : new dependency_manager_t{});
+
+ osmdata_t osmdata{dependency_manager.get(), middle, outputs};
</pre>
<p>I added a commit that moves the dependency manager into osmdata.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/pull/1168#discussion_r426255520">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353QTWOW2CADGMQHJEIDRR7JTLANCNFSM4M7BTDNQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AA6353RUKXQLEJFVT4V7VLLRR7JTLA5CNFSM4M7BTDN2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGODCQEP7A.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/pull/1168#discussion_r426255520",
"url": "https://github.com/openstreetmap/osm2pgsql/pull/1168#discussion_r426255520",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>