diff --git a/iphone/Maps/Core/Routing/MWMRoutePoint+CPP.h b/iphone/Maps/Core/Routing/MWMRoutePoint+CPP.h index 511af52a6a..7ed60662af 100644 --- a/iphone/Maps/Core/Routing/MWMRoutePoint+CPP.h +++ b/iphone/Maps/Core/Routing/MWMRoutePoint+CPP.h @@ -9,12 +9,12 @@ - (instancetype)initWithURLSchemeRoutePoint:(url_scheme::RoutePoint const &)point type:(MWMRoutePointType)type - intermediateIndex:(int8_t)intermediateIndex; + intermediateIndex:(size_t)intermediateIndex; - (instancetype)initWithRouteMarkData:(RouteMarkData const &)point; - (instancetype)initWithPoint:(m2::PointD const &)point title:(NSString *)title subtitle:(NSString *)subtitle type:(MWMRoutePointType)type - intermediateIndex:(int8_t)intermediateIndex; + intermediateIndex:(size_t)intermediateIndex; @end diff --git a/iphone/Maps/Core/Routing/MWMRoutePoint.h b/iphone/Maps/Core/Routing/MWMRoutePoint.h index cf952b9176..056754bdca 100644 --- a/iphone/Maps/Core/Routing/MWMRoutePoint.h +++ b/iphone/Maps/Core/Routing/MWMRoutePoint.h @@ -7,14 +7,14 @@ typedef NS_ENUM(NSUInteger, MWMRoutePointType) { @interface MWMRoutePoint : NSObject - (instancetype)initWithLastLocationAndType:(MWMRoutePointType)type - intermediateIndex:(int8_t)intermediateIndex; + intermediateIndex:(size_t)intermediateIndex; @property(copy, nonatomic, readonly) NSString * title; @property(copy, nonatomic, readonly) NSString * subtitle; @property(copy, nonatomic, readonly) NSString * latLonString; @property(nonatomic, readonly) BOOL isMyPosition; @property(nonatomic) MWMRoutePointType type; -@property(nonatomic) int8_t intermediateIndex; +@property(nonatomic) size_t intermediateIndex; @property(nonatomic, readonly) double latitude; @property(nonatomic, readonly) double longitude; diff --git a/iphone/Maps/Core/Routing/MWMRoutePoint.mm b/iphone/Maps/Core/Routing/MWMRoutePoint.mm index 492497906c..c3bb8c9b6c 100644 --- a/iphone/Maps/Core/Routing/MWMRoutePoint.mm +++ b/iphone/Maps/Core/Routing/MWMRoutePoint.mm @@ -17,7 +17,7 @@ @implementation MWMRoutePoint - (instancetype)initWithLastLocationAndType:(MWMRoutePointType)type - intermediateIndex:(int8_t)intermediateIndex + intermediateIndex:(size_t)intermediateIndex { auto lastLocation = [MWMLocationManager lastLocation]; if (!lastLocation) @@ -40,7 +40,7 @@ - (instancetype)initWithURLSchemeRoutePoint:(url_scheme::RoutePoint const &)point type:(MWMRoutePointType)type - intermediateIndex:(int8_t)intermediateIndex + intermediateIndex:(size_t)intermediateIndex { self = [super init]; if (self) @@ -83,7 +83,7 @@ title:(NSString *)title subtitle:(NSString *)subtitle type:(MWMRoutePointType)type - intermediateIndex:(int8_t)intermediateIndex + intermediateIndex:(size_t)intermediateIndex { self = [super init]; if (self) diff --git a/iphone/Maps/UI/PlacePage/MWMPlacePageData.mm b/iphone/Maps/UI/PlacePage/MWMPlacePageData.mm index 2923348228..2aa1b98d43 100644 --- a/iphone/Maps/UI/PlacePage/MWMPlacePageData.mm +++ b/iphone/Maps/UI/PlacePage/MWMPlacePageData.mm @@ -731,7 +731,7 @@ using namespace place_page; #pragma mark - Getters - (RouteMarkType)routeMarkType { return m_info.GetRouteMarkType(); } -- (int8_t)intermediateIndex { return m_info.GetIntermediateIndex(); } +- (size_t)intermediateIndex { return m_info.GetIntermediateIndex(); } - (NSString *)address { return @(m_info.GetAddress().c_str()); } - (NSString *)apiURL { return @(m_info.GetApiUrl().c_str()); } - (std::vector const &)sections { return m_sections; } diff --git a/iphone/Maps/UI/PlacePage/MWMPlacePageManager.mm b/iphone/Maps/UI/PlacePage/MWMPlacePageManager.mm index 9a64ba580b..8399fc0145 100644 --- a/iphone/Maps/UI/PlacePage/MWMPlacePageManager.mm +++ b/iphone/Maps/UI/PlacePage/MWMPlacePageManager.mm @@ -367,7 +367,7 @@ void logSponsoredEvent(MWMPlacePageData * data, NSString * eventName) } - (MWMRoutePoint *)routePointWithType:(MWMRoutePointType)type - intermediateIndex:(int8_t)intermediateIndex + intermediateIndex:(size_t)intermediateIndex { auto data = self.data; if (!data) diff --git a/map/place_page_info.hpp b/map/place_page_info.hpp index f454e3a00c..3d2201aaed 100644 --- a/map/place_page_info.hpp +++ b/map/place_page_info.hpp @@ -171,8 +171,8 @@ public: /// Routing void SetRouteMarkType(RouteMarkType type) { m_routeMarkType = type; } RouteMarkType GetRouteMarkType() const { return m_routeMarkType; } - void SetIntermediateIndex(int8_t index) { m_intermediateIndex = index; } - int8_t GetIntermediateIndex() const { return m_intermediateIndex; } + void SetIntermediateIndex(size_t index) { m_intermediateIndex = index; } + size_t GetIntermediateIndex() const { return m_intermediateIndex; } void SetIsRoutePoint() { m_isRoutePoint = true; } /// CountryId @@ -236,7 +236,7 @@ private: /// Routing RouteMarkType m_routeMarkType; - int8_t m_intermediateIndex = 0; + size_t m_intermediateIndex = 0; bool m_isRoutePoint = false; bool m_isMyPosition = false;