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