Commit Graph

33 Commits

Author SHA1 Message Date
ff91d49869 Update copyright date 2024-01-26 16:45:53 +01:00
8887b0ee6e Don't use unchecked array subscript
Makes clang-tidy happy if we use at() and it doesn't cost us much here.
2023-08-17 09:46:43 +02:00
7ba523ba37 Update copyright date to 2023 2023-01-15 16:13:42 +01:00
5e8d774fa0 Use fmt::format() function instead of ""_format literal
This replaces most uses of the ""_format literal with function calls to
fmt::format(). The latter form is available in all versions of the fmt
library, while the ""_format literal is deprecated in version 8 and
removed in version 9.

This might cost us some performance and early error detection, because
in at least some versions of the fmt library the _format() construct was
used to compile the format patterns at run time. That's why there are
some uses of the literal left in places where performance might be more
critical, they need a closer look.

See #1704
2023-01-06 20:15:40 +01:00
cdca1fb4a9 Prefer std::array instead of plain C arrays 2022-03-16 14:25:53 +01:00
56d5145615 Updates copyright date to 2022 in all files 2022-01-11 14:30:34 +01:00
0d8d829185 Remove use of boost::lexical_cast
One less dependency and UB sanitizer warns that boost::lexical_cast has
undefined behaviour.

Fixes #1028
2021-05-27 12:03:33 +02:00
d45018f88b Update copyright year to 2021 2021-01-28 09:38:17 +01:00
61bdfb4bc5 Add/update copyright notice on all C++ files
This adds a copyright notice to all C++ files and the README clarifying
the license. (There is no change of the license.) This also removes a
few names explicitly mentioned as copyright holders, instead refering to
the git log which has a full list of all osm2pgsql developers. (There is
also still the AUTHORS file which names the most important developers.)

The only exception is the sprompt.cpp file which was taken from
PostgreSQL and keeps its original license information (and, of course,
the files in contrib).
2020-12-19 11:25:07 +01:00
4eea0a0274 Put fmt library into contrib and use it
Changes all uses of boost::format to use the "xxx"_format syntax of the
fmt library. Starting from C++14 this will parse the format strings at
compile time making sure the format string and the arguments fit
together.

This also changes the CMake config so that you can set the C++ version
to compile with by using something like -DCMAKE_CXX_STANDARD=14 . C++11
is still the default.

On travis bionic builds are now using C++14.
2019-11-29 14:56:52 +01:00
56927b8cfb Move catch2 into contrib, update to current version
This way it can be included as system include and is easier to set apart
in coverage checks etc.
2019-11-20 12:14:00 +01:00
069c2830ec clang-format tests 2019-11-15 21:52:42 +01:00
8859b6eb8e move new tests into place 2019-11-15 21:52:42 +01:00
cfd30eee95 port two remaining output-pgsql tests to catch 2019-11-15 21:52:41 +01:00
de71d16c62 initial implementation of buffer filling functions in db-copy 2019-02-16 22:03:05 +01:00
5eaaf99409 fix warnings appearing with -Wextra
This fixes pretty much exclusively unsued-parameter
warnings. Removes some function parameters which have
fallen out of use and also the permutating parameter
test. The latter did not really do what it promised
and was pretty much beyond repair.
2019-02-09 17:36:31 +01:00
b5809ed9a1 Hand outputs a shared pointer to the middle query object
Binds the lifetime of the middle objects to the outputs.
2019-01-13 12:02:47 +01:00
4ca2ed5f4b osmdata: remove unused projection member 2019-01-12 18:17:43 +01:00
c538ce4c82 do not handle extra attributes via parameter passthough
There are only three classes that really need the information
about extra attributes and they all already have access to the
options.
2016-12-11 23:37:51 +01:00
434000c1c1 make osmdata work directly with libosmium data types
Requires to move reprojection and addition of attributes into
the osmdata class.
2016-12-11 23:37:50 +01:00
79bc3cdb89 remove custom o5m parser in favour of libosmium parser
This commit includes some larger structural changes:

- parse_t and parse_delegate_t removed, osm2pgsql now directly
  creates a parse_osmium_t object
- bbox class replaced with osmium::Box
- code duplication in parse_stats_t cleaned up
- add generic parse() function for tests, also to avoid code duplication
2015-11-06 23:44:54 +01:00
34382ba8bd update to libosmium 2.3.0
- remove protobuf dependencies as libosmium now comes with its own pbf parser
- fix remaining uses of libxml2 as file format in tests
2015-08-19 00:10:31 +02:00
8845378bcd Move recurring DB test functions to common-pg 2015-07-30 00:27:53 -07:00
b638514fa4 Add a test for tables existing in another schema 2015-07-29 23:23:01 -07:00
3d44d34db1 Move db options into database_options_t 2015-07-25 19:48:12 -07:00
8de5aa0276 Move parse into a constructor
Using a delgating constructor lets us set default options then
parse the command line.
2015-07-25 17:38:03 -07:00
8795dde014 Replace boost::scoped_ptr within tests 2015-07-18 18:10:00 -07:00
8b0ffe4a6a Replace boost::shared_ptr with std::shared_ptr 2015-07-18 02:14:31 -07:00
6b5a0fffbf Move from NULL to nullptr
This leaves alone the o5m code, geos, and libosmium.
2015-07-17 16:30:35 -07:00
0ae1376a58 Strip out unused z_order test code 2015-07-16 16:09:03 -07:00
ec83a3106a Fix skip_test.what() function defs
C++11 wants const noexcept to agree with the virtual definition
2015-07-16 16:09:03 -07:00
8e68c9cadc adapt z-order test to new layout of parse class 2015-07-14 23:34:54 +02:00
a2f5b94560 Change z_order of link roads and add tests
Mosat maps prefer placing link roads below non-link roads. This allows
them to do so without complex SQL or multiple layer solutions which
break layer tag usage.

z_order per layer has also been increased from 10 to 100 to allow
for this more fine-grained ordering.

Other types of roads (tracks, paths, etc) have been added. This
does not impact those not using z_order for layers with these, but
does allow their use.
2015-07-05 14:02:51 -07:00