Apply suggestions from code review

Co-authored-by: Alexander Borsuk <170263+biodranik@users.noreply.github.com>
Signed-off-by: Sergiy Kozyr <s.trump@gmail.com>
This commit is contained in:
Sergiy Kozyr 2024-08-14 16:13:26 +03:00 committed by GitHub
parent 3802453b5e
commit 548425f133
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 9 additions and 9 deletions

View file

@ -26,10 +26,10 @@ enum class Version : uint8_t
// tags to kml
V9 = 9, // 01 October 2020: add minZoom to bookmarks
Latest = V9,
V8MM = 10, // 27 July 2023: MapsMe release version v15.0.71617. Technically it's version is 8
V8MM = 10, // 27 July 2023: MapsMe released version v15.0.71617. Technically its version is 8
// (first byte is 0x08), but it's not compatible with V8 from this repo. It has
// no compilations.
V9MM = 11 // In July 2024 MapsMe release version with new KMB format. Technically its version is 9
V9MM = 11 // In July 2024 MapsMe released version with a new KMB format. Technically its version is 9
// (first byte is 0x09), but it's not compatible with OrganicMaps V9 from this repo. It has
// extra flag in tracks data.
};

View file

@ -849,8 +849,8 @@ UNIT_TEST(Kml_Deserialization_From_Bin_V8_And_V8MM)
TEST(false, ("Exception raised", exc.what()));
}
// Can't compare dataFromBinV8.m_categoryData and dataFromBinV8MM.m_categoryData directly
// because new format has less properties and different m_id. Compare some properties here:
// Can't compare dataFromBinV8.m_categoryData and dataFromBinV8MM.m_categoryData directly
// because new format has less properties and different m_id. Compare some properties here:
TEST_EQUAL(dataFromBinV8.m_categoryData.m_name, dataFromBinV8MM.m_categoryData.m_name, ());
TEST_EQUAL(dataFromBinV8.m_categoryData.m_description, dataFromBinV8MM.m_categoryData.m_description, ());
TEST_EQUAL(dataFromBinV8.m_categoryData.m_annotation, dataFromBinV8MM.m_categoryData.m_annotation, ());
@ -876,7 +876,7 @@ UNIT_TEST(Kml_Deserialization_From_KMB_V8_And_V9MM)
}
catch (kml::binary::DeserializerKml::DeserializeException const & exc)
{
TEST(false, ("Exception raised", exc.what()));
TEST(false, ("Failed to deserialize data from KMB V8 and V9MM", exc.what()));
}
kml::FileData dataFromBinV9MM;
@ -888,7 +888,7 @@ UNIT_TEST(Kml_Deserialization_From_KMB_V8_And_V9MM)
}
catch (kml::binary::DeserializerKml::DeserializeException const & exc)
{
TEST(false, ("Exception raised", exc.what()));
TEST(false, ("Failed to deserialize data from KMB V9MM", exc.what()));
}
// Can't compare dataFromBinV8.m_categoryData and dataFromBinV9MM.m_categoryData directly

View file

@ -1645,7 +1645,7 @@ std::vector<uint8_t> const kBinKmlV8MM = {
0x98, 0x00, 0x01, 0x00, 0x29
};
// kBinKmlV8MM contains the same bookmarks and tracks as kBinKmlV7
// kBinKmlV9MM contains the same bookmarks and tracks as kBinKmlV8
std::vector<uint8_t> const kBinKmlV9MM = {
0x09, 0x26, 0x41, 0x3a, 0x33, 0x39, 0x37, 0x33, 0x65, 0x66, 0x34, 0x64, 0x2d, 0x66, 0x35, 0x31,
0x65, 0x2d, 0x34, 0x61, 0x37, 0x31, 0x2d, 0x38, 0x65, 0x64, 0x34, 0x2d, 0x64, 0x65, 0x61, 0x33,

View file

@ -25,12 +25,12 @@ struct TrackDataV9MM : TrackDataV8MM
DECLARE_COLLECTABLE(LocalizableStringIndex, m_name, m_description, m_nearestToponyms, m_properties)
// Extra field introduced in V9MM.
// Extra field introduced in V9MM for tracks.
bool m_flag1 = true;
};
// FileDataV8MM contains the same sections as FileDataV8MM but with changed m_tracksData format
// Contains the same sections as FileDataV8MM but with changed m_tracksData format
struct FileDataV9MM
{
DECLARE_VISITOR_AND_DEBUG_PRINT(FileDataV9MM, visitor(m_serverId, "serverId"),