diff --git a/apps/float_pair_store.cpp b/apps/float_pair_store.cpp index 845d91a85..10dc97754 100644 --- a/apps/float_pair_store.cpp +++ b/apps/float_pair_store.cpp @@ -2,6 +2,7 @@ #include #include #include +#include FloatPairStore::FloatPairStore() : m_numberOfPairs(0) @@ -58,8 +59,7 @@ float FloatPairStore::sumOfColumn(int i) { uint32_t FloatPairStore::storeChecksum() { size_t dataLengthInBytes = m_numberOfPairs*2*sizeof(float); assert((dataLengthInBytes & 0x3) == 0); // Assert that dataLengthInBytes is a multiple of 4 - //return Ion::crc32((uint32_t *)m_data, dataLengthInBytes>>2); - return sumOfColumn(0)+sumOfColumn(1); + return Ion::crc32((uint32_t *)m_data, dataLengthInBytes>>2); } float FloatPairStore::defaultValue(int i) { diff --git a/apps/graph/function_store.cpp b/apps/graph/function_store.cpp index 42c4d7971..0592f211e 100644 --- a/apps/graph/function_store.cpp +++ b/apps/graph/function_store.cpp @@ -3,6 +3,7 @@ extern "C" { #include } #include +#include 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) { diff --git a/apps/interactive_curve_view_range.cpp b/apps/interactive_curve_view_range.cpp index 9403cd215..ce97048e7 100644 --- a/apps/interactive_curve_view_range.cpp +++ b/apps/interactive_curve_view_range.cpp @@ -25,8 +25,7 @@ uint32_t InteractiveCurveViewRange::rangeChecksum() { float data[5] = {m_xMin, m_xMax, m_yMin, m_yMax, m_yAuto ? 1.0f : 0.0f}; size_t dataLengthInBytes = 5*sizeof(float); assert((dataLengthInBytes & 0x3) == 0); // Assert that dataLengthInBytes is a multiple of 4 - //return Ion::crc32((uint32_t *)data, dataLengthInBytes>>2); - return m_xMin+ m_xMax+ m_yMin+ m_yMax+ m_yAuto; + return Ion::crc32((uint32_t *)data, dataLengthInBytes>>2); } float InteractiveCurveViewRange::xMin() { diff --git a/apps/statistics/store.cpp b/apps/statistics/store.cpp index 36d78b90b..a6f2d734c 100644 --- a/apps/statistics/store.cpp +++ b/apps/statistics/store.cpp @@ -3,6 +3,7 @@ #include #include #include +#include namespace Statistics { @@ -18,8 +19,7 @@ uint32_t Store::barChecksum() { float data[2] = {m_barWidth, m_firstDrawnBarAbscissa}; size_t dataLengthInBytes = 2*sizeof(float); assert((dataLengthInBytes & 0x3) == 0); // Assert that dataLengthInBytes is a multiple of 4 - //return Ion::crc32((uint32_t *)data, dataLengthInBytes>>2); - return m_barWidth + m_firstDrawnBarAbscissa; + return Ion::crc32((uint32_t *)data, dataLengthInBytes>>2); } /* Histogram bars */