[apps] Use crc32 methods in models

Change-Id: I2c0588eef90c8015d13fd7aed87a4b615243fe5c
This commit is contained in:
Émilie Feral
2017-01-09 15:27:37 +01:00
parent affda5eae9
commit e9e171935c
4 changed files with 7 additions and 8 deletions

View File

@@ -3,6 +3,7 @@ extern "C" {
#include <assert.h>
}
#include <stddef.h>
#include <ion.h>
namespace Graph {
@@ -19,8 +20,7 @@ FunctionStore::FunctionStore() :
uint32_t FunctionStore::storeChecksum() {
size_t dataLengthInBytes = m_numberOfFunctions*sizeof(Function);
assert((dataLengthInBytes & 0x3) == 0); // Assert that dataLengthInBytes is a multiple of 4
//return Ion::crc32((uint32_t *)m_functions, dataLengthInBytes>>2);
return m_numberOfFunctions;
return Ion::crc32((uint32_t *)m_functions, dataLengthInBytes>>2);
}
Function * FunctionStore::functionAtIndex(int i) {