|
19 | 19 |
|
20 | 20 | #pragma once |
21 | 21 |
|
22 | | -#include <stdint.h> |
23 | | - |
24 | 22 | #include <array> |
| 23 | +#include <cstdint> |
25 | 24 | #include <stdexcept> |
26 | 25 | #include <vector> |
27 | 26 |
|
28 | 27 | #include "imgui.h" |
29 | 28 | #if defined(__i386__) || defined(_M_IX86) || defined(__x86_64) || defined(_M_AMD64) |
30 | | -#define MEMORY_OBSERVER_X86 // Do not include immintrin/xbyak or use avx intrinsics unless we're compiling for x86 |
| 29 | +#define MEMORY_OBSERVER_X86 // Do not include immintrin/xbyak or use avx intrinsics unless we're compiling for x86 |
31 | 30 | #include "immintrin.h" |
32 | 31 | #endif |
33 | 32 |
|
@@ -78,7 +77,7 @@ class MemoryObserver { |
78 | 77 | * Pattern search. |
79 | 78 | */ |
80 | 79 |
|
81 | | - #ifdef MEMORY_OBSERVER_X86 |
| 80 | +#ifdef MEMORY_OBSERVER_X86 |
82 | 81 | template <int bufferSize> |
83 | 82 | static __m256i avx2_getShuffleResultsFor(const std::array<uint8_t, bufferSize>& buffer, |
84 | 83 | std::array<uint8_t, 32>& extendedBuffer, int mask) { |
@@ -158,12 +157,12 @@ class MemoryObserver { |
158 | 157 | } |
159 | 158 | } |
160 | 159 | static bool all_equal(__m256i input); |
161 | | - #else |
| 160 | +#else |
162 | 161 | template <int bufferSize> |
163 | 162 | void simd_populateAddressList(const uint8_t* memData, uint32_t memBase, uint32_t memSize) { |
164 | | - throw std::runtime_error("SIMD pattern searching is not supported on this platform! This shouldn't have been called!"); |
| 163 | + throw std::runtime_error("SIMD pattern searching is not supported on this platform!"); |
165 | 164 | } |
166 | | - #endif // MEMORY_OBSERVER_X86 |
| 165 | +#endif // MEMORY_OBSERVER_X86 |
167 | 166 |
|
168 | 167 | static std::vector<uint8_t> getShuffleResultsFor(const std::vector<uint8_t>& buffer); |
169 | 168 | static bool matchesPattern(const std::vector<uint8_t>& buffer, const std::vector<uint8_t>& patternShuffleResults); |
|
0 commit comments