@@ -27,8 +27,8 @@ class ByteArray : public std::vector<uint8_t> {
27
27
reinterpret_cast <const uint8_t *>(data + size))
28
28
{}
29
29
30
- ByteArray (std::size_t sizeHint = DEFAULT_SIZE_HINT) {
31
- reserve (sizeHint );
30
+ ByteArray (std::size_t size_hint = DEFAULT_SIZE_HINT) {
31
+ reserve (size_hint );
32
32
}
33
33
34
34
template <typename Iterator>
@@ -42,12 +42,12 @@ class ByteArray : public std::vector<uint8_t> {
42
42
push_back (b);
43
43
}
44
44
45
- std::size_t findSequence (const char * sequence, std::size_t sequenceSize ) {
46
- const std::size_t mSize = size ();
47
- if (mSize >= sequenceSize ) {
48
- for (std::size_t i = 0 ; i <= mSize - sequenceSize ; ++i) {
45
+ std::size_t find_sequence (const char * sequence, std::size_t sequence_size ) {
46
+ const std::size_t ssize = size ();
47
+ if (ssize >= sequence_size ) {
48
+ for (std::size_t i = 0 ; i <= ssize - sequence_size ; ++i) {
49
49
bool found = true ;
50
- for (std::size_t j = 0 ; j < sequenceSize ; ++j) {
50
+ for (std::size_t j = 0 ; j < sequence_size ; ++j) {
51
51
if (at (i + j) != sequence[j]) {
52
52
found = false ;
53
53
break ;
@@ -65,12 +65,12 @@ class ByteArray : public std::vector<uint8_t> {
65
65
return std::string (reinterpret_cast <const char *>(this ->data ()), this ->size ());
66
66
}
67
67
68
- uint32_t calcCheckSum () {
69
- return calcCheckSum <ByteArray>(*this );
68
+ uint32_t calc_check_sum () {
69
+ return calc_check_sum <ByteArray>(*this );
70
70
}
71
71
72
72
template <typename T>
73
- static uint32_t calcCheckSum (const T& iterable) {
73
+ static uint32_t calc_check_sum (const T& iterable) {
74
74
uint32_t sum = 0 ;
75
75
for (uint8_t c : iterable) {
76
76
sum += static_cast <unsigned int >(c);
0 commit comments