[ion] Ion::Storage is not a global variable anymore

This commit is contained in:
Romain Goyet
2018-04-10 15:05:41 +02:00
parent 5b379010d8
commit 628992680b
6 changed files with 41 additions and 27 deletions

View File

@@ -13,7 +13,10 @@
#define HEADER_SECTION
#endif
extern Ion::Storage storage;
namespace Ion {
extern char staticStorageArea[];
}
constexpr void * storageAddress = &(Ion::staticStorageArea);
class PlatformInfo {
public:
@@ -21,7 +24,7 @@ public:
m_header(Magic),
m_version{EPSILON_VERSION},
m_patchLevel{PATCH_LEVEL},
m_storageAddress(&storage),
m_storageAddress(storageAddress),
m_footer(Magic) { }
const char * version() const {
assert(m_storageAddress != nullptr);