forked from organicmaps/organicmaps
Review fixes.
This commit is contained in:
parent
037d271dbe
commit
199c1e123e
7 changed files with 9 additions and 14 deletions
|
@ -1,4 +1,4 @@
|
|||
#include "map/generate_chart.hpp"
|
||||
#include "map/chart_generator.hpp"
|
||||
|
||||
#include "base/assert.hpp"
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#include "map/framework.hpp"
|
||||
#include "map/ge0_parser.hpp"
|
||||
#include "map/generate_chart.hpp"
|
||||
#include "map/chart_generator.hpp"
|
||||
#include "map/geourl_process.hpp"
|
||||
#include "map/gps_tracker.hpp"
|
||||
#include "map/user_mark.hpp"
|
||||
|
@ -2985,11 +2985,12 @@ bool Framework::OriginalFeatureHasDefaultName(FeatureID const & fid) const
|
|||
}
|
||||
|
||||
bool Framework::HasRouteAltitude() const { return m_routingSession.HasRouteAltitude(); }
|
||||
|
||||
bool Framework::GenerateRouteAltitudeChart(size_t width, size_t height, bool day,
|
||||
vector<uint8_t> & imageRGBAData) const
|
||||
{
|
||||
feature::TAltitudes altitudes;
|
||||
if (!m_routingSession.GetRouteAltitudes(altitudes) && altitudes.empty())
|
||||
if (!m_routingSession.GetRouteAltitudes(altitudes))
|
||||
return false;
|
||||
deque<double> segDistanceM;
|
||||
if (!m_routingSession.GetSegDistanceM(segDistanceM) && segDistanceM.empty())
|
||||
|
@ -3002,7 +3003,6 @@ bool Framework::GenerateRouteAltitudeChart(size_t width, size_t height, bool day
|
|||
". Number of segment is", segDistanceM.size()));
|
||||
}
|
||||
|
||||
// @TODO It's necessary to normalize and center altitude information.
|
||||
GenerateChart(width, height, segDistanceM, altitudes, day, imageRGBAData);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -15,11 +15,11 @@ HEADERS += \
|
|||
booking_api.hpp \
|
||||
bookmark.hpp \
|
||||
bookmark_manager.hpp \
|
||||
chart_generator.hpp \
|
||||
displacement_mode_manager.hpp \
|
||||
feature_vec_model.hpp \
|
||||
framework.hpp \
|
||||
ge0_parser.hpp \
|
||||
generate_chart.hpp \
|
||||
geourl_process.hpp \
|
||||
gps_track.hpp \
|
||||
gps_track_collection.hpp \
|
||||
|
@ -39,11 +39,11 @@ SOURCES += \
|
|||
booking_api.cpp \
|
||||
bookmark.cpp \
|
||||
bookmark_manager.cpp \
|
||||
chart_generator.cpp \
|
||||
displacement_mode_manager.cpp \
|
||||
feature_vec_model.cpp \
|
||||
framework.cpp \
|
||||
ge0_parser.cpp \
|
||||
generate_chart.cpp \
|
||||
geourl_process.cpp \
|
||||
gps_track.cpp \
|
||||
gps_track_collection.cpp \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "testing/testing.hpp"
|
||||
|
||||
#include "map/generate_chart.hpp"
|
||||
#include "map/chart_generator.hpp"
|
||||
|
||||
#include "base/math.hpp"
|
||||
|
||||
|
@ -103,10 +103,6 @@ UNIT_TEST(GenerateChartTest)
|
|||
vector<uint8_t> frameBuffer;
|
||||
|
||||
GenerateChart(width, 50 /* height */, distanceDataM, altitudeDataM, false /* day */, frameBuffer);
|
||||
LOG(LINFO, (frameBuffer[0]));
|
||||
LOG(LINFO, (frameBuffer[1]));
|
||||
LOG(LINFO, (frameBuffer[2]));
|
||||
LOG(LINFO, (frameBuffer[3]));
|
||||
TEST(IsColor(frameBuffer, 0 /* startColorIdx */, 255 /* expectedR */, 255 /* expectedG */,
|
||||
255 /* expectedB */, 0 /* expectedA */),
|
||||
());
|
|
@ -38,9 +38,9 @@ SOURCES += \
|
|||
address_tests.cpp \
|
||||
booking_tests.cpp \
|
||||
bookmarks_test.cpp \
|
||||
chart_generator_tests.cpp \
|
||||
feature_getters_tests.cpp \
|
||||
ge0_parser_tests.cpp \
|
||||
generate_chart_tests.cpp \
|
||||
geourl_test.cpp \
|
||||
gps_track_collection_test.cpp \
|
||||
gps_track_storage_test.cpp \
|
||||
|
|
|
@ -148,6 +148,7 @@ public:
|
|||
double GetCompletionPercent() const;
|
||||
|
||||
void EmitCloseRoutingEvent() const;
|
||||
bool HasRouteAltitudeImpl() const;
|
||||
|
||||
private:
|
||||
struct DoReadyCallback
|
||||
|
@ -175,8 +176,6 @@ private:
|
|||
void RemoveRoute();
|
||||
void RemoveRouteImpl();
|
||||
|
||||
bool HasRouteAltitudeImpl() const;
|
||||
|
||||
private:
|
||||
unique_ptr<AsyncRouter> m_router;
|
||||
Route m_route;
|
||||
|
|
Loading…
Add table
Reference in a new issue