-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,36 @@ | ||
// | ||
// DO NOT MODIFY version.hpp, it is automatically generated by cmake | ||
// The version is controlled in CMakeLists.txt | ||
// Change the version numbers in CMakeLists.txt | ||
// | ||
|
||
#ifndef SZ3_VERSION_HPP | ||
#define SZ3_VERSION_HPP | ||
#include <sstream> | ||
|
||
#define SZ3_MAGIC_NUMBER 0xF342F310 | ||
|
||
#define SZ3_NAME "SZ3" | ||
#define SZ3_VER "3.1.7" | ||
#define SZ3_VER "3.2.0" | ||
#define SZ3_VER_MAJOR 3 | ||
#define SZ3_VER_MINOR 1 | ||
#define SZ3_VER_PATCH 7 | ||
#define SZ3_VER_TWEAK | ||
#define SZ3_VER_MINOR 2 | ||
#define SZ3_VER_PATCH 0 | ||
#define SZ3_VER_TWEAK | ||
|
||
#define SZ3_DATA_VER "3.2.0" | ||
|
||
uint32_t versionInt(const std::string& version) { | ||
uint32_t major = 0, minor = 0, patch = 0; | ||
char dot; | ||
std::stringstream ss(version); | ||
ss >> major >> dot >> minor >> dot >> patch; | ||
return (major << 24) | (minor << 16) | (patch<<8); | ||
} | ||
|
||
std::string versionStr(uint32_t version) { | ||
uint32_t major = (version >> 24) & 0xFF; | ||
uint32_t minor = (version >> 16) & 0xFF; | ||
uint32_t patch = (version >> 8) & 0xFF; | ||
return std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(patch); | ||
} | ||
|
||
#endif //SZ3_VERSION_HP | ||
#endif //SZ3_VERSION_HPP |