Fixed typo in flatbuffers: longitute -> longitude.
This commit is contained in:
		
							parent
							
								
									b8182dd7ff
								
							
						
					
					
						commit
						0be87c73cf
					
				@ -72,7 +72,7 @@ module.exports = function () {
 | 
			
		||||
                        var fb = FBResult.getRootAsFBResult(buf);
 | 
			
		||||
                        var location = fb.waypoints(0).location();
 | 
			
		||||
 | 
			
		||||
                        coord = [location.longitute(), location.latitude()];
 | 
			
		||||
                        coord = [location.longitude(), location.latitude()];
 | 
			
		||||
 | 
			
		||||
                        var got = { in: row.in, out: row.out };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -127,7 +127,7 @@ osrm.engine.api.fbresult.Position.prototype.__init = function(i, bb) {
 | 
			
		||||
/**
 | 
			
		||||
 * @returns {number}
 | 
			
		||||
 */
 | 
			
		||||
osrm.engine.api.fbresult.Position.prototype.longitute = function() {
 | 
			
		||||
osrm.engine.api.fbresult.Position.prototype.longitude = function() {
 | 
			
		||||
  return this.bb.readFloat32(this.bb_pos);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@ -140,14 +140,14 @@ osrm.engine.api.fbresult.Position.prototype.latitude = function() {
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @param {flatbuffers.Builder} builder
 | 
			
		||||
 * @param {number} longitute
 | 
			
		||||
 * @param {number} longitude
 | 
			
		||||
 * @param {number} latitude
 | 
			
		||||
 * @returns {flatbuffers.Offset}
 | 
			
		||||
 */
 | 
			
		||||
osrm.engine.api.fbresult.Position.createPosition = function(builder, longitute, latitude) {
 | 
			
		||||
osrm.engine.api.fbresult.Position.createPosition = function(builder, longitude, latitude) {
 | 
			
		||||
  builder.prep(4, 8);
 | 
			
		||||
  builder.writeFloat32(latitude);
 | 
			
		||||
  builder.writeFloat32(longitute);
 | 
			
		||||
  builder.writeFloat32(longitude);
 | 
			
		||||
  return builder.offset();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -176,19 +176,19 @@ inline const char *EnumNameTurn(Turn e) {
 | 
			
		||||
 | 
			
		||||
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Position FLATBUFFERS_FINAL_CLASS {
 | 
			
		||||
 private:
 | 
			
		||||
  float longitute_;
 | 
			
		||||
  float longitude_;
 | 
			
		||||
  float latitude_;
 | 
			
		||||
 | 
			
		||||
 public:
 | 
			
		||||
  Position() {
 | 
			
		||||
    memset(static_cast<void *>(this), 0, sizeof(Position));
 | 
			
		||||
  }
 | 
			
		||||
  Position(float _longitute, float _latitude)
 | 
			
		||||
      : longitute_(flatbuffers::EndianScalar(_longitute)),
 | 
			
		||||
  Position(float _longitude, float _latitude)
 | 
			
		||||
      : longitude_(flatbuffers::EndianScalar(_longitude)),
 | 
			
		||||
        latitude_(flatbuffers::EndianScalar(_latitude)) {
 | 
			
		||||
  }
 | 
			
		||||
  float longitute() const {
 | 
			
		||||
    return flatbuffers::EndianScalar(longitute_);
 | 
			
		||||
  float longitude() const {
 | 
			
		||||
    return flatbuffers::EndianScalar(longitude_);
 | 
			
		||||
  }
 | 
			
		||||
  float latitude() const {
 | 
			
		||||
    return flatbuffers::EndianScalar(latitude_);
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
namespace osrm.engine.api.fbresult;
 | 
			
		||||
 | 
			
		||||
struct Position {
 | 
			
		||||
    longitute: float;
 | 
			
		||||
    longitude: float;
 | 
			
		||||
    latitude:  float;
 | 
			
		||||
}
 | 
			
		||||
@ -503,7 +503,7 @@ BOOST_AUTO_TEST_CASE(test_route_serialize_fb)
 | 
			
		||||
 | 
			
		||||
    for (const auto &waypoint : *waypoints)
 | 
			
		||||
    {
 | 
			
		||||
        const auto longitude = waypoint->location()->longitute();
 | 
			
		||||
        const auto longitude = waypoint->location()->longitude();
 | 
			
		||||
        const auto latitude = waypoint->location()->latitude();
 | 
			
		||||
        BOOST_CHECK(longitude >= -180. && longitude <= 180.);
 | 
			
		||||
        BOOST_CHECK(latitude >= -90. && latitude <= 90.);
 | 
			
		||||
@ -548,7 +548,7 @@ BOOST_AUTO_TEST_CASE(test_route_serialize_fb)
 | 
			
		||||
 | 
			
		||||
                for (auto intersection : *intersections)
 | 
			
		||||
                {
 | 
			
		||||
                    const auto longitude = intersection->location()->longitute();
 | 
			
		||||
                    const auto longitude = intersection->location()->longitude();
 | 
			
		||||
                    const auto latitude = intersection->location()->latitude();
 | 
			
		||||
                    BOOST_CHECK(longitude >= -180. && longitude <= 180.);
 | 
			
		||||
                    BOOST_CHECK(latitude >= -90. && latitude <= 90.);
 | 
			
		||||
 | 
			
		||||
@ -24,7 +24,7 @@ inline bool waypoint_check(json::Value waypoint)
 | 
			
		||||
 | 
			
		||||
inline bool waypoint_check(const osrm::engine::api::fbresult::Waypoint *const waypoint)
 | 
			
		||||
{
 | 
			
		||||
    util::FloatLongitude lon{waypoint->location()->longitute()};
 | 
			
		||||
    util::FloatLongitude lon{waypoint->location()->longitude()};
 | 
			
		||||
    util::FloatLatitude lat{waypoint->location()->latitude()};
 | 
			
		||||
    util::Coordinate location_coordinate(lon, lat);
 | 
			
		||||
    return location_coordinate.IsValid();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user