Commit Graph

4802 Commits

Author SHA1 Message Date
Daniel J. Hofmann
e20f92bbbb Anonymous namespaces in header files are bad
They duplicate the code across translation units.
2016-01-19 17:42:49 +01:00
Daniel J. Hofmann
6e717bfd30 Switch to const constexpr for header constants (3.5/3 internal linkage) 2016-01-19 17:42:49 +01:00
Daniel J. Hofmann
5d743bb0a3 Switch to explicit find in tidy script 2016-01-19 17:42:49 +01:00
Patrick Niklaus
42942bb1e0 Add regression test 2016-01-19 17:36:29 +01:00
Patrick Niklaus
9d12de9bce Fix wrong assertion and emplace_back bug in trip plugin 2016-01-19 17:36:29 +01:00
Patrick Niklaus
790520e335 Enable AppVeyor only for master/develop and PRs 2016-01-18 21:23:13 +01:00
Daniel J. Hofmann
4b0e1a4b19 Run modernizer 2016-01-18 16:54:30 +01:00
Daniel J. Hofmann
a877f8abf0 Switch to explicit find in modernize script 2016-01-18 16:54:13 +01:00
Daniel J. Hofmann
491b1d9c96 Remove headers with no reverse dependencies
Found with

```
daniel@x1c /t/o/i/util> for header in *.hpp
                            echo -n $header:
                            ag -iQ $header ../../ --noheading | wc -l
                        end
...
fixed_point_number.hpp:0
range_algorithms.hpp:0
...
```

Only two. Surprises me to be honest.
But we're cleaning up for quite a bit now.
2016-01-18 16:05:39 +01:00
Moritz Kobitzsch
8a745ecdfd fixed u-turn testcase to actually emit u-turn instruction 2016-01-15 19:56:39 +01:00
Moritz Kobitzsch
b8e29f5ae3 Add a u-turn instruciton when performing a u-turn at a via-node 2016-01-15 19:56:39 +01:00
Patrick Niklaus
22e83013e3 Fix uturns at dead-end streets 2016-01-15 16:24:21 +01:00
Patrick Niklaus
cc4713d878 Add regression test for uturn before barrier 2016-01-15 00:56:31 +01:00
Patrick Niklaus
490e838c60 Add regression test for Disney Land bug 2016-01-15 00:39:49 +01:00
Patrick Niklaus
6b15f29d7c Fix handling unexpected errors. 2016-01-14 18:27:36 +01:00
Daniel J. Hofmann
e7d9e42a16 Fix race condition in osrm-routed HTTP server
We had a similar issue a few month ago. Stumbled upon this by accident.

It goes like this:

- `output_buffer` is function-local
- we pass it to async_write and leave the scope
- `output_buffers` goes out of scope
- bad things happen, sometimes

The fix is to, again, put it inside the connection that handles itself
via the enable_shared_from_this idiom.

References:

- http://www.boost.org/doc/libs/1_59_0/doc/html/boost_asio/reference/async_write/overload1.html
- https://github.com/Project-OSRM/osrm-backend/pull/1690
2016-01-13 23:21:45 +01:00
Patrick Niklaus
bd91727f49 Merge pull request #1890 from zimathias/fix-debian-package-upgrades
Fix debian package upgrades.
2016-01-13 23:19:20 +01:00
Mathias Gug
328faf3744 Fix debian package upgrades.
The postinst script fails on package upgrade given that the symlink
already exists.

Note that symlinks should *not* be handled in a postinst scripts.
Instead dh_links should be used so that symlinks are compliant with the
Debian policy.
2016-01-13 11:53:59 -08:00
Patrick Niklaus
1157cb9b95 Remove obsolete protobuf test 2016-01-13 17:57:22 +01:00
Daniel J. Hofmann
7c8626d144 No longer install osmosis in docker env 2016-01-13 17:57:22 +01:00
Daniel J. Hofmann
03faf2665b No longer install osmosis on travis 2016-01-13 17:57:22 +01:00
Daniel J. Hofmann
9959fd26bb Do not convert osm xml files to pbf for the cucumber tests 2016-01-13 17:57:22 +01:00
Daniel J. Hofmann
43dcdb21ec Revert "Build osmium_convert in order to be able to eventually replace osmosis"
This reverts commit 344588114dd5076385b35e0fbaef966de681f95f.
2016-01-13 17:57:22 +01:00
Daniel J. Hofmann
3727637145 Build osmium_convert in order to be able to eventually replace osmosis
This provides a script to build the libosmium examples such as
osmium_convert (to convert from xml to pbf).

I initially tried a CMake ExternalProject setup, but this was more
complicated than I initially thought; this is the more elegant solution.

The goal is to eventually rip out osmosis, so that we no longer depend
on java for the cucumber tests.

References:

- https://github.com/Project-OSRM/osrm-backend/issues/1788
2016-01-13 17:57:22 +01:00
Daniel J. Hofmann
466251287f Define compile-time constants for coordinate calculation only once
Closes #1327.
2016-01-12 19:59:02 +01:00
Daniel J. Hofmann
f46706843b STXXL's debug build creates stxxl_debug.{a,so}, adapts FindSTXXL
References:

- https://github.com/Project-OSRM/osrm-backend/issues/1885
2016-01-12 13:40:36 +01:00
Daniel J. Hofmann
c93ca02fb8 Rips out dead code from the container.hpp and creates for_each_pai.hpp
I added two TODOs that I would like to address in the future.
2016-01-11 20:14:35 +01:00
Daniel J. Hofmann
4813488f84 Split import_edge.hpp: node_based_edge.hpp, edge_based_edge.hpp closes #1604 2016-01-11 20:11:44 +01:00
Daniel J. Hofmann
fc292cc2d8 No need for extra translation units (for edge data structures) 2016-01-11 20:11:44 +01:00
Daniel J. Hofmann
f875e26fbf Inline mercator transformations; no need for separate translation unit 2016-01-11 20:10:45 +01:00
Patrick Niklaus
05658aeb3b Ignore .swp file 2016-01-11 20:06:12 +01:00
Patrick Niklaus
a14cb1fc06 Merge pull request #1818 from gardster/side_road_tag_support
A side_road tag support for the OSRM car profile.
2016-01-11 17:10:42 +01:00
Daniel J. Hofmann
f68247673a Make ComputeAngle a free standing function 2016-01-09 19:55:22 +01:00
Daniel J. Hofmann
f65dd63210 Make TurnInstructionsClass functions free standing functions 2016-01-09 19:55:22 +01:00
Daniel J. Hofmann
03f64a6c20 Make RouteNameExtraction a free standing function 2016-01-09 19:55:22 +01:00
Daniel J. Hofmann
0627c3443d Make PolylineFormatter's encodedAsJSON and unencodedAsJSON free standing functions 2016-01-09 19:55:22 +01:00
Daniel J. Hofmann
c65dd16460 Make PolylineCompresser's encode and decode free standing functions 2016-01-09 19:55:22 +01:00
Daniel J. Hofmann
c590596dbe Make DouglasPeucker a free standing function 2016-01-09 19:55:21 +01:00
Patrick Niklaus
23cd4d5ed2 not -> ! 2016-01-09 19:42:31 +01:00
Moritz Kobitzsch
4dc6ff9fb8 and another missed not 2016-01-09 19:42:31 +01:00
Moritz Kobitzsch
8638cbf8b2 missed a not 2016-01-09 19:42:31 +01:00
Moritz Kobitzsch
a2555983e6 replaces and/not with &&/! for windows 2016-01-09 19:42:31 +01:00
Daniel J. Hofmann
21804aecdb Prefer inline over static inline for free standing functions
When you mark free standing functions as `static inline` instead
of just `inline` they can not get merged across TUs and therefore
produce code bloat which is bad for the binaries size, the CPUs
instruction cache, and so on.

Please also see the discussion at:

- https://groups.google.com/forum/#!topic/mozilla.dev.platform/Ulw9HoZbSyQ
- http://stackoverflow.com/a/12836392

Note that non-fully specialized templates (i.e. with a kind of at
least `Template :: * -> *`) are `inline` by default.
2016-01-08 23:33:31 +01:00
Patrick Niklaus
6991a38703 Run clang-format 2016-01-08 01:31:57 +01:00
Patrick Niklaus
6b18e4f7e9 Add namespace around all files 2016-01-08 01:30:52 +01:00
Patrick Niklaus
efc9007cbf Remore start_phantom/target_phantom because they are useless here 2016-01-07 22:51:37 +01:00
Moritz Kobitzsch
efd33b295a Refactor guidance generation 2016-01-07 22:51:24 +01:00
Patrick Niklaus
fa4ba42f15 Use a sane gps_precision multipler 2016-01-07 16:30:54 +01:00
Daniel J. Hofmann
d3ef520915 Print message about ccache usage from cmake 2016-01-07 15:20:32 +01:00
Patrick Niklaus
811e29ff1b Add cmath to geospatial_query 2016-01-07 11:35:35 +01:00