avoid namespace pollution
Some checks failed
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
Some checks failed
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
This commit is contained in:
parent
aa5d1042f0
commit
e684680d60
@ -1,12 +1,22 @@
|
||||
#include "version.h"
|
||||
|
||||
#include "fsfw/FSFWVersion.h"
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#ifdef major
|
||||
#undef major
|
||||
#endif
|
||||
|
||||
#ifdef minor
|
||||
#undef minor
|
||||
#endif
|
||||
|
||||
const fsfw::Version fsfw::FSFW_VERSION = {FSFW_VERSION_MAJOR, FSFW_VERSION_MINOR,
|
||||
FSFW_VERSION_REVISION};
|
||||
|
||||
fsfw::Version::Version(uint32_t major, uint32_t minor, uint32_t revision)
|
||||
: major(major), minor(minor), revision(revision) {}
|
||||
|
||||
void fsfw::Version::getVersion(char* str, size_t maxLen) const {
|
||||
snprintf(str, maxLen, "%d.%d.%d", major, minor, revision);
|
||||
}
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include <iostream>
|
||||
#endif
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
|
||||
namespace fsfw {
|
||||
|
||||
@ -53,9 +52,7 @@ class Version {
|
||||
* @param str
|
||||
* @param maxLen
|
||||
*/
|
||||
void getVersion(char* str, size_t maxLen) const {
|
||||
snprintf(str, maxLen, "%d.%d.%d", major, minor, revision);
|
||||
}
|
||||
void getVersion(char* str, size_t maxLen) const;
|
||||
};
|
||||
|
||||
extern const fsfw::Version FSFW_VERSION;
|
||||
|
Loading…
Reference in New Issue
Block a user