Commit Graph

4875 Commits

Author SHA1 Message Date
Daniel J. Hofmann
60fc486cea Prefix exception header guard with osrm prefix 2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
978b70c998 Adds a comment as to why the char to typed enum class transformation is not possible 2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
ef171f3acd Properly use typed math constants instead of impl. specific hacks
PI is not in the stdlib, neither is 1/pi, pi*2 and so on. Instead
of relying on implementations providing these, use properly typed
math constants.

Main benefits:
- portable and
- returns constexpr, for compile-time computation

References:
- http://www.boost.org/doc/libs/1_60_0/libs/math/doc/html/math_toolkit/constants_intro.html
- http://www.boost.org/doc/libs/1_60_0/libs/math/doc/html/math_toolkit/constants.html
2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
64b36807d3 Transforms osrm_exception to exception 2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
5de8f1803c Folds mercator projections into coordinate_calculation 2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
d1c4a26791 Remove .restriction reference 2016-02-11 19:19:28 -08:00
karenzshea
a647cb9836 kick 2016-02-11 17:36:49 -05:00
karenzshea
7398bed974 Include real coordinates in debug geojson mode 2016-02-11 17:09:20 -05:00
Patrick Niklaus
6077708831 Merge pull request #1964 from Project-OSRM/libosmium-2.6.0
Update libosmium to v2.6.0
2016-02-10 20:51:34 -05:00
Dane Springmeyer
6eebb1c089 Support passing OSRM_SHARED_LIBRARY_PATH env variable for cucumber tests
The need for this is that:

  - On OS X if libraries are stored in custom locations (not /usr/lib or /usr/local)
    and they do not embed an rpath (which is common to not have) then the developer
    needs to set DYLD_LIBRARY_PATH to ensure that osrm tools can find dependent libraries
    at runtime (this is normal and common).
  - But as of OS X > 10.11 DYLD_LIBRARY_PATH no longer is inherited. While it works in
    the main shell when running a command like `osrm-extract` you will find that when
    `osrm-extract` is run by cucumber (ruby child process) then DYLD_LIBRARY_PATH
    is blocked and the command cannot start.
  - So, this introduces the ability to pass in a variable that the cucumber tests will
    understand and can manually forward along to ensure that DYLD_LIBRARY_PATH is respected
    where it counts.

The intended usage of this is therefore:

    # set the environment variable
    export OSRM_SHARED_LIBRARY_PATH=${DYLD_LIBRARY_PATH}
    # then run cucumber tests
    cucumber -p verify
2016-02-11 02:43:51 +01:00
Daniel J. Hofmann
6cd55e535c Removes potentially dangerous and misleading lat, lon subscript oeprator 2016-02-11 02:37:33 +01:00
Dane Springmeyer
7d0955c0f4 Merge pull request #1960 from Project-OSRM/cucumber-exit-early
Ensure key command line programs can be run before running cucumber tests
2016-02-10 16:03:17 -08:00
Dane Springmeyer
8c9d24bd9f Merge pull request #1962 from Project-OSRM/no-static-visitor
Remove uneeded and deprecated usage of mapbox::util::static_visitor
2016-02-10 16:02:56 -08:00
Dane Springmeyer
c40375a424 update libosmium to v2.6.0 2016-02-10 13:41:22 -08:00
Dane Springmeyer
2949a52a11 remove uneeded and deprecated usage of mapbox::util::static_visitor 2016-02-10 12:58:36 -08:00
Dane Springmeyer
2e762d05f9 Ensure key command line programs can be run before running cucumber tests
- Otherwise, currently, if osrm-extract crashes at startup then
    the tests continue on and will crash many many times.
  - This also tests that --help returns an exit code of zero and will
    catch if this behavior ever changes or is inconsistent between
    the command line programs
2016-02-09 17:49:47 -08:00
Daniel J. Hofmann
bb06bfbbd7 Same undefined behavior from shifting into the sign bit in Storage 2016-02-08 11:47:44 -08:00
Daniel J. Hofmann
b8d20dfe99 Prevent undefined behavior from left shifting into sign bit when offset is 31 2016-02-08 11:47:44 -08:00
Daniel J. Hofmann
fa8529949b Make swap noexcept (as it has to be!) and fix swap misuses 2016-02-08 11:47:44 -08:00
Daniel J. Hofmann
7b37c847bd Fixes shared memory wrapper includes 2016-02-08 11:47:02 -08:00
Daniel J. Hofmann
3075f6cea7 No need for deferred, non-blocking or timeout acquisition 2016-02-08 11:26:40 -08:00
Daniel J. Hofmann
ff966490bb Fixes datafacade includes 2016-02-08 11:26:40 -08:00
Patrick Niklaus
46993b43fe Merge pull request #1954 from sebastic/edges-typo
Fix 'egdes' typo, replace with 'edges'.
2016-02-06 22:01:16 -05:00
Bas Couwenberg
5e15bceaae Fix 'egdes' typo, replace with 'edges'. 2016-02-07 02:59:44 +01:00
Patrick Niklaus
fefe5e241a Merge pull request #1946 from kerrick-lyft/develop
Add operator<< to OSRM_STRONG_TYPEDEF
2016-02-01 16:30:43 -05:00
Kerrick Staley
8804330d83 Add operator<< to OSRM_STRONG_TYPEDEF
Useful for debugging.
2016-02-01 12:32:30 -08:00
karenzshea
f5c12ec433 comments 2016-01-29 23:49:09 +01:00
karenzshea
262cdd7bc0 move tribool obj into request_parser 2016-01-29 23:49:09 +01:00
Patrick Niklaus
efee07e20b Move arrays don't copy 2016-01-29 15:58:48 +01:00
Moritz Kobitzsch
603b83e1c3 Fixes Alternative Routing when including loops 2016-01-28 16:33:07 +01:00
Daniel J. Hofmann
a48f02e0da Takes care of proper special member generation globally, fixes #1689
Phew, a lot of classes were affected by this. The rationale for the
changes are as follows:

- When a type X declares any constructor, the default constructor is
  not declared, so there is no need for X() = delete there. In fact,
  there is brutal difference between those two: deleted members
  participate in overload resolution, but not-declared members do not!

- When a type X wants to be non-copyable (e.g. to be only movable, like
  threads, unique_ptrs, and so on), you can either do it by inheriting
  from boost::noncopyable (the old way), or better declare both (!) the
  copy constructor _and_ the copy assignment operator as deleted:

      X(X const&) = delete;
      X& operator=(X const&) = delete;

  We had tons of types with deleted copy constructors that were lacking
  a corresponding deleted copy assignment operator, making them still
  copyable and you wouldn't even notice (read: scary)!

References:

- http://accu.org/content/conf2014/Howard_Hinnant_Accu_2014.pdf
- http://www.boost.org/doc/libs/master/libs/core/doc/html/core/noncopyable.html

Note: I know, I'm quoting Hinnant's extraordinary slides a lot, but
getting the sematic right here is so incredibly important.
2016-01-27 17:25:30 +01:00
Daniel J. Hofmann
d189339495 Makes the extractor no longer depend on the crc32 computation 2016-01-27 17:18:04 +01:00
Patrick Niklaus
0802804677 Fix PR comments 2016-01-26 22:57:02 +01:00
Patrick Niklaus
d9c281cd7c Remove boost fusion dependency in RouteParameters 2016-01-26 22:57:02 +01:00
Patrick Niklaus
46185fe9e8 Ptr -> auto 2016-01-26 22:57:02 +01:00
Daniel J. Hofmann
38e8a90f4e Make HilbertCode a free standing function 2016-01-26 22:57:02 +01:00
Daniel J. Hofmann
7a115e93c0 Removes check-hsgr 2016-01-26 22:57:02 +01:00
Daniel J. Hofmann
d391df52ba Be kind to the optimizer, pass coordinates by value (just two ints) 2016-01-26 22:57:02 +01:00
Daniel J. Hofmann
46fc6f8da4 Collapse computeAngle into coordinate calculation 2016-01-26 22:57:02 +01:00
Daniel J. Hofmann
0fcca04150 TU-local STXXL comparator for OSMNodeIDs, needs {min,max}_value
Can not use std::less<>{} because of this.
2016-01-26 22:57:02 +01:00
Daniel J. Hofmann
54a9173107 Make public RouteParameters header no longer depend on Spirit
And includes the optional header that was transitively included by the
spirit header before. Hopefully this will speed up compile times, as the
RouteParameters header is used in a lot of translation units.
2016-01-26 22:57:02 +01:00
Patrick Niklaus
bf455c8d20 Fix empty parameter list 2016-01-26 22:56:19 +01:00
Patrick Niklaus
c05d23a586 Fix POST request 2016-01-26 22:56:19 +01:00
Freenerd
2a882aa58d Tests: Preserve param order on POST 2016-01-26 22:56:19 +01:00
Daniel J. Hofmann
04e26ba6b8 Adds missing cstdlib header for std::llabs 2016-01-26 17:54:08 +01:00
Daniel J. Hofmann
2211731c80 Alternative test depends on random order, make less random-ish 2016-01-26 17:54:08 +01:00
Daniel J. Hofmann
0fbdd57835 Quickfixes polyline encoder's undefined behavior via left-shifting negative numbers 2016-01-26 17:54:08 +01:00
Daniel J. Hofmann
312b414d8f Adapts XORFastHashStorage to XORFastHash compile time limits 2016-01-26 17:54:08 +01:00
Daniel J. Hofmann
a6e7954128 Make XORFastHash's number of hashable elements compile time constant
Still constraint by the usage of uint32_t and subsequent splitting into
two uint16_t we use for indexing into the tables.
2016-01-26 17:54:08 +01:00
Daniel J. Hofmann
1417d43430 Cut down memory usage for tables in XORFastHash by factor of four
`pow(2, 16)` is not `2 << 16` but rather `1 << 16`.

With this change we cut memory usage in half for the XORFastHash's two
tables. Adapts XORFastHashStorage, memory usage reduction by factor two.
2016-01-26 17:54:08 +01:00