diff options
author | Sergey Yershov <yershov@corp.mail.ru> | 2015-09-14 14:00:58 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:05:21 +0300 |
commit | b4c9f13918384c7c0023c622c9f349facd7b6be1 (patch) | |
tree | 577b8f1c394ecde66683fd03a29080abc59c924d /platform | |
parent | 60249c88138aecefc525d4267d47bb1c7bfc27ec (diff) |
Add generator_tool option for set mwm version for all dataset
Diffstat (limited to 'platform')
-rw-r--r-- | platform/mwm_version.cpp | 7 | ||||
-rw-r--r-- | platform/mwm_version.hpp | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/platform/mwm_version.cpp b/platform/mwm_version.cpp index 2796860b21..f9b431ab32 100644 --- a/platform/mwm_version.cpp +++ b/platform/mwm_version.cpp @@ -43,16 +43,13 @@ void ReadVersionT(TSource & src, MwmVersion & version) MwmVersion::MwmVersion() : format(unknownFormat), timestamp(0) {} -void WriteVersion(Writer & w) +void WriteVersion(Writer & w, uint32_t versionDate) { w.Write(MWM_PROLOG, ARRAY_SIZE(MWM_PROLOG)); // write inner data version WriteVarUint(w, static_cast<uint32_t>(lastFormat)); - - // static is used for equal time stamp for all "mwm" files in one generation process - static uint32_t generatorStartTime = my::TodayAsYYMMDD(); - WriteVarUint(w, generatorStartTime); + WriteVarUint(w, versionDate); } void ReadVersion(ReaderSrc & src, MwmVersion & version) { ReadVersionT(src, version); } diff --git a/platform/mwm_version.hpp b/platform/mwm_version.hpp index 7fe07778a0..ee1f393976 100644 --- a/platform/mwm_version.hpp +++ b/platform/mwm_version.hpp @@ -29,7 +29,7 @@ struct MwmVersion }; /// Writes latest format and current timestamp to the writer. -void WriteVersion(Writer & w); +void WriteVersion(Writer & w, uint32_t versionDate); /// Reads mwm version from src. void ReadVersion(ReaderSrc & src, MwmVersion & version); |