@@ -125,12 +125,12 @@ const void *Scalar::GetBytes() const {
125
125
bytes += 8 - byte_size;
126
126
}
127
127
return bytes;
128
+ // getRawData always returns a pointer to an array of uint64_t values,
129
+ // where the least-significant word always comes first. On big-endian
130
+ // systems we need to swap the words.
128
131
case e_sint128:
129
132
case e_uint128:
130
133
apint_words = m_integer.getRawData ();
131
- // getRawData always returns a pointer to an array of two uint64_t values,
132
- // where the least-significant word always comes first. On big-endian
133
- // systems we need to swap the two words.
134
134
if (endian::InlHostByteOrder () == eByteOrderBig) {
135
135
swapped_words[0 ] = apint_words[1 ];
136
136
swapped_words[1 ] = apint_words[0 ];
@@ -140,9 +140,6 @@ const void *Scalar::GetBytes() const {
140
140
case e_sint256:
141
141
case e_uint256:
142
142
apint_words = m_integer.getRawData ();
143
- // getRawData always returns a pointer to an array of four uint64_t values,
144
- // where the least-significant word always comes first. On big-endian
145
- // systems we need to swap the four words.
146
143
if (endian::InlHostByteOrder () == eByteOrderBig) {
147
144
swapped_words[0 ] = apint_words[3 ];
148
145
swapped_words[1 ] = apint_words[2 ];
@@ -154,9 +151,6 @@ const void *Scalar::GetBytes() const {
154
151
case e_sint512:
155
152
case e_uint512:
156
153
apint_words = m_integer.getRawData ();
157
- // getRawData always returns a pointer to an array of four uint64_t values,
158
- // where the least-significant word always comes first. On big-endian
159
- // systems we need to swap the four words.
160
154
if (endian::InlHostByteOrder () == eByteOrderBig) {
161
155
swapped_words[0 ] = apint_words[7 ];
162
156
swapped_words[1 ] = apint_words[6 ];
0 commit comments