Added Error type.

This commit is contained in:
2015-09-07 03:27:39 -05:00
parent 3d68fa45e5
commit 54d64aa0ab
3 changed files with 4 additions and 2 deletions
+2
View File
@@ -20,6 +20,8 @@ typedef unsigned uint_t;
typedef long long int64_t; typedef long long int64_t;
typedef unsigned long long uint64_t; typedef unsigned long long uint64_t;
typedef uint32_t Error;
#ifdef _LP64 #ifdef _LP64
typedef uint64_t size_t; typedef uint64_t size_t;
#elif _LP32 #elif _LP32
+1 -1
View File
@@ -37,7 +37,7 @@ void MemFs::Record::setData(uint8_t *data, int size) {
// MemFs // MemFs
MemFs::MemFs(uint8_t *begin, uint8_t *end, uint32_t *error): m_version(*((uint32_t*) begin)), m_lastRec(*(MemFsPtr*) (begin + sizeof(m_version))) { MemFs::MemFs(uint8_t *begin, uint8_t *end, Error *error): m_version(*((uint32_t*) begin)), m_lastRec(*(MemFsPtr*) (begin + sizeof(m_version))) {
if (error) { if (error) {
if (version != m_version) { if (version != m_version) {
// version mismatch // version mismatch
+1 -1
View File
@@ -51,7 +51,7 @@ class MemFs {
* @param end pointer to the end of this MemFs's memory chunk * @param end pointer to the end of this MemFs's memory chunk
* @param error pointer to a integer return errors into * @param error pointer to a integer return errors into
*/ */
MemFs(uint8_t *begin, uint8_t *end, uint32_t *error = nullptr); MemFs(uint8_t *begin, uint8_t *end, Error *error = nullptr);
/** /**
* Initializes the memory chunk of this MemFs was given. * Initializes the memory chunk of this MemFs was given.