[Tile-serving] [openstreetmap/osm2pgsql] simplify ram node cache by removing unused dirty bit support (#809)

Jon Burgess notifications at github.com
Sat Jan 6 18:03:53 UTC 2018


Compiling the current master on F27 gives the warning below. It turns out that the `set_used()` macro and the dirty bit handling is no longer used and can be removed.
<pre>In file included from /home/jburgess/osm2pgsql/options.hpp:4:0,
                 from /home/jburgess/osm2pgsql/expire-tiles.cpp:18:
/home/jburgess/osm2pgsql/node-ram-cache.hpp: In member function ‘void ramNodeBlock::set_used(int)’:
/home/jburgess/osm2pgsql/node-ram-cache.hpp:43:45: warning: ‘<<’ in boolean context, did you mean ‘<’ ? [-Wint-in-bool-context]
     void set_used(int used) { _used = (used << 1) || (_used & 1); }
                                       ~~~~~~^~~~~
</pre>
All the tests pass after making this change.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/osm2pgsql/pull/809

-- Commit Summary --

  * Remove unused ramNodeBlock functions
  * Remove unused usage of dirty-bit in ram node cache

-- File Changes --

    M node-ram-cache.hpp (11)

-- Patch Links --

https://github.com/openstreetmap/osm2pgsql/pull/809.patch
https://github.com/openstreetmap/osm2pgsql/pull/809.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/809
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20180106/2c26ca41/attachment.html>


More information about the Tile-serving mailing list