@@ -179,58 +179,61 @@ class TableAPI final : public BaseAPI
179179 {
180180 if (!parameters.skip_waypoints )
181181 {
182- response.values [ " sources" ] = MakeWaypoints (candidates);
182+ response.values . emplace ( " sources" , MakeWaypoints (candidates) );
183183 }
184184 number_of_sources = candidates.size ();
185185 }
186186 else
187187 {
188188 if (!parameters.skip_waypoints )
189189 {
190- response.values [ " sources" ] = MakeWaypoints (candidates, parameters.sources );
190+ response.values . emplace ( " sources" , MakeWaypoints (candidates, parameters.sources ) );
191191 }
192192 }
193193
194194 if (parameters.destinations .empty ())
195195 {
196196 if (!parameters.skip_waypoints )
197197 {
198- response.values [ " destinations" ] = MakeWaypoints (candidates);
198+ response.values . emplace ( " destinations" , MakeWaypoints (candidates) );
199199 }
200200 number_of_destinations = candidates.size ();
201201 }
202202 else
203203 {
204204 if (!parameters.skip_waypoints )
205205 {
206- response.values [ " destinations" ] =
207- MakeWaypoints (candidates, parameters.destinations );
206+ response.values . emplace ( " destinations" ,
207+ MakeWaypoints (candidates, parameters.destinations ) );
208208 }
209209 }
210210
211211 if (parameters.annotations & TableParameters::AnnotationsType::Duration)
212212 {
213- response.values [" durations" ] =
214- MakeDurationTable (tables.first , number_of_sources, number_of_destinations);
213+ response.values .emplace (
214+ " durations" ,
215+ MakeDurationTable (tables.first , number_of_sources, number_of_destinations));
215216 }
216217
217218 if (parameters.annotations & TableParameters::AnnotationsType::Distance)
218219 {
219- response.values [" distances" ] =
220- MakeDistanceTable (tables.second , number_of_sources, number_of_destinations);
220+ response.values .emplace (
221+ " distances" ,
222+ MakeDistanceTable (tables.second , number_of_sources, number_of_destinations));
221223 }
222224
223225 if (parameters.fallback_speed != from_alias<double >(INVALID_FALLBACK_SPEED) &&
224226 parameters.fallback_speed > 0 )
225227 {
226- response.values [" fallback_speed_cells" ] = MakeEstimatesTable (fallback_speed_cells);
228+ response.values .emplace (" fallback_speed_cells" ,
229+ MakeEstimatesTable (fallback_speed_cells));
227230 }
228231
229- response.values [ " code" ] = " Ok" ;
232+ response.values . emplace ( " code" , " Ok" ) ;
230233 auto data_timestamp = facade.GetTimestamp ();
231234 if (!data_timestamp.empty ())
232235 {
233- response.values [ " data_version" ] = data_timestamp;
236+ response.values . emplace ( " data_version" , data_timestamp) ;
234237 }
235238 }
236239
0 commit comments