From ac6855a4734be099319e4003eff4951074e7fd57 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Fri, 22 Mar 2019 21:15:00 +0200 Subject: [core] Fix signature of fluent interface setters --- include/mbgl/map/map_options.hpp | 8 ++++---- include/mbgl/storage/resource_options.hpp | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/mbgl/map/map_options.hpp b/include/mbgl/map/map_options.hpp index 384b113dba..b5dc2930c9 100644 --- a/include/mbgl/map/map_options.hpp +++ b/include/mbgl/map/map_options.hpp @@ -28,7 +28,7 @@ public: * @param mode Map rendering mode. * @return MapOptions for chaining options together. */ - MapOptions withMapMode(MapMode mode); + MapOptions& withMapMode(MapMode mode); /** * @brief Gets the previously set (or default) map mode. @@ -45,7 +45,7 @@ public: * @param mode Map constrain mode. * @return MapOptions for chaining options together. */ - MapOptions withConstrainMode(ConstrainMode mode); + MapOptions& withConstrainMode(ConstrainMode mode); /** * @brief Gets the previously set (or default) constrain mode. @@ -61,7 +61,7 @@ public: * @param mode Viewport mode. * @return MapOptions for chaining options together. */ - MapOptions withViewportMode(ViewportMode mode); + MapOptions& withViewportMode(ViewportMode mode); /** * @brief Gets the previously set (or default) viewport mode. @@ -77,7 +77,7 @@ public: * @param enableCollisions true to enable, false to disable * @return MapOptions for chaining options together. */ - MapOptions withCrossSourceCollisions(bool enableCollisions); + MapOptions& withCrossSourceCollisions(bool enableCollisions); /** * @brief Gets the previously set (or default) crossSourceCollisions value. diff --git a/include/mbgl/storage/resource_options.hpp b/include/mbgl/storage/resource_options.hpp index 958392175c..e8a56920e0 100644 --- a/include/mbgl/storage/resource_options.hpp +++ b/include/mbgl/storage/resource_options.hpp @@ -25,7 +25,7 @@ public: * @param token Mapbox access token. * @return ResourceOptions for chaining options together. */ - ResourceOptions withAccessToken(std::string token); + ResourceOptions& withAccessToken(std::string token); /** * @brief Gets the previously set (or default) Mapbox access token. @@ -40,7 +40,7 @@ public: * @param baseURL API base URL. * @return ResourceOptions for chaining options together. */ - ResourceOptions withBaseURL(std::string baseURL); + ResourceOptions& withBaseURL(std::string baseURL); /** * @brief Gets the previously set (or default) API base URL. @@ -55,7 +55,7 @@ public: * @param path Cache path. * @return ResourceOptions for chaining options together. */ - ResourceOptions withCachePath(std::string path); + ResourceOptions& withCachePath(std::string path); /** * @brief Gets the previously set (or default) cache path. @@ -71,7 +71,7 @@ public: * @param path Asset path. * @return ResourceOptions for chaining options together. */ - ResourceOptions withAssetPath(std::string path); + ResourceOptions& withAssetPath(std::string path); /** * @brief Gets the previously set (or default) asset path. @@ -86,7 +86,7 @@ public: * @param size Cache maximum size in bytes. * @return reference to ResourceOptions for chaining options together. */ - ResourceOptions withMaximumCacheSize(uint64_t size); + ResourceOptions& withMaximumCacheSize(uint64_t size); /** * @brief Gets the previously set (or default) maximum allowed cache size. @@ -102,7 +102,7 @@ public: * @param context Platform context. * @return reference to ResourceOptions for chaining options together. */ - ResourceOptions withPlatformContext(void* context); + ResourceOptions& withPlatformContext(void* context); /** * @brief Gets the previously set (or default) platform context. -- cgit v1.2.1