diff --git a/apps/graph/cartesian_function_store.cpp b/apps/graph/cartesian_function_store.cpp index 7c74dacea..d7acf19c9 100644 --- a/apps/graph/cartesian_function_store.cpp +++ b/apps/graph/cartesian_function_store.cpp @@ -24,7 +24,7 @@ uint32_t CartesianFunctionStore::storeChecksum() { for (int i = 0; i < k_maxNumberOfFunctions; i++) { checksums[i] = m_functions[i].checksum(); } - return Ion::crc32((uint32_t *)checksums, dataLengthInBytes>>2); + return Ion::crc32((uint32_t *)checksums, dataLengthInBytes/sizeof(uint32_t)); } CartesianFunction * CartesianFunctionStore::functionAtIndex(int i) { diff --git a/apps/sequence/sequence.cpp b/apps/sequence/sequence.cpp index 6a618ab10..da74c9f97 100644 --- a/apps/sequence/sequence.cpp +++ b/apps/sequence/sequence.cpp @@ -89,7 +89,7 @@ uint32_t Sequence::checksum() { data[k_dataLengthInBytes-3] = (char)m_type; data[k_dataLengthInBytes-2] = name()!= nullptr ? name()[0] : 0; data[k_dataLengthInBytes-1] = isActive() ? 1 : 0; - return Ion::crc32((uint32_t *)data, k_dataLengthInBytes>>2); + return Ion::crc32((uint32_t *)data, k_dataLengthInBytes/sizeof(uint32_t)); } const char * Sequence::firstInitialConditionText() { diff --git a/apps/sequence/sequence_store.cpp b/apps/sequence/sequence_store.cpp index 991d30762..044d36c20 100644 --- a/apps/sequence/sequence_store.cpp +++ b/apps/sequence/sequence_store.cpp @@ -17,7 +17,7 @@ uint32_t SequenceStore::storeChecksum() { for (int i = 0; i < k_maxNumberOfSequences; i++) { checksums[i] = m_sequences[i].checksum(); } - return Ion::crc32((uint32_t *)checksums, dataLengthInBytes>>2); + return Ion::crc32((uint32_t *)checksums, dataLengthInBytes/sizeof(uint32_t)); } Sequence * SequenceStore::functionAtIndex(int i) { diff --git a/apps/shared/curve_view_range.cpp b/apps/shared/curve_view_range.cpp index 62a688612..06c16ad46 100644 --- a/apps/shared/curve_view_range.cpp +++ b/apps/shared/curve_view_range.cpp @@ -11,7 +11,7 @@ uint32_t CurveViewRange::rangeChecksum() { float data[4] = {xMin(), xMax(), yMin(), yMax()}; size_t dataLengthInBytes = 4*sizeof(float); assert((dataLengthInBytes & 0x3) == 0); // Assert that dataLengthInBytes is a multiple of 4 - return Ion::crc32((uint32_t *)data, dataLengthInBytes>>2); + return Ion::crc32((uint32_t *)data, dataLengthInBytes/sizeof(uint32_t)); } float CurveViewRange::yGridUnit() { diff --git a/apps/shared/float_pair_store.cpp b/apps/shared/float_pair_store.cpp index 07054ddcc..e28313c11 100644 --- a/apps/shared/float_pair_store.cpp +++ b/apps/shared/float_pair_store.cpp @@ -64,7 +64,7 @@ uint32_t FloatPairStore::storeChecksum() { * clear the store when deleting pairs. However, this might trigger a bug? */ size_t dataLengthInBytes = m_numberOfPairs*2*sizeof(double); assert((dataLengthInBytes & 0x3) == 0); // Assert that dataLengthInBytes is a multiple of 4 - return Ion::crc32((uint32_t *)m_data, dataLengthInBytes>>2); + return Ion::crc32((uint32_t *)m_data, dataLengthInBytes/sizeof(uint32_t)); } double FloatPairStore::defaultValue(int i) { diff --git a/apps/shared/function.cpp b/apps/shared/function.cpp index 9ad67890a..f54ed0abd 100644 --- a/apps/shared/function.cpp +++ b/apps/shared/function.cpp @@ -31,7 +31,7 @@ uint32_t Function::checksum() { strlcpy(data, m_text, TextField::maxBufferSize()); data[k_dataLengthInBytes-2] = m_name != nullptr ? m_name[0] : 0; data[k_dataLengthInBytes-1] = m_active ? 1 : 0; - return Ion::crc32((uint32_t *)data, k_dataLengthInBytes>>2); + return Ion::crc32((uint32_t *)data, k_dataLengthInBytes/sizeof(uint32_t)); } void Function::setContent(const char * c) { diff --git a/apps/shared/interactive_curve_view_range.cpp b/apps/shared/interactive_curve_view_range.cpp index 538e7c8bf..d16caa735 100644 --- a/apps/shared/interactive_curve_view_range.cpp +++ b/apps/shared/interactive_curve_view_range.cpp @@ -29,7 +29,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 Ion::crc32((uint32_t *)data, dataLengthInBytes/sizeof(uint32_t)); } bool InteractiveCurveViewRange::yAuto() { diff --git a/apps/statistics/store.cpp b/apps/statistics/store.cpp index e67d63aed..41e46887d 100644 --- a/apps/statistics/store.cpp +++ b/apps/statistics/store.cpp @@ -21,7 +21,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 Ion::crc32((uint32_t *)data, dataLengthInBytes/sizeof(uint32_t)); } /* Histogram bars */