File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ namespace SourceHook
248
248
*/
249
249
namespace
250
250
{
251
- bool ModuleInMemory (char *addr, size_t len)
251
+ static inline bool ModuleInMemory (char *addr, size_t len)
252
252
{
253
253
#if SH_SYS == SH_SYS_LINUX
254
254
// On linux, first check /proc/self/maps
@@ -322,10 +322,8 @@ namespace SourceHook
322
322
prevHandler = signal (SIGSEGV, BadReadHandler);
323
323
324
324
volatile const char *p = reinterpret_cast <const char *>(addr);
325
- char dummy;
326
-
327
325
for (size_t i = 0 ; i < len; i++)
328
- dummy = p[i];
326
+ p[i];
329
327
330
328
g_BadReadCalled = false ;
331
329
@@ -346,10 +344,8 @@ namespace SourceHook
346
344
return false ;
347
345
348
346
volatile const char *p = reinterpret_cast <const char *>(addr);
349
- char dummy;
350
-
351
347
for (size_t i = 0 ; i < len; i++)
352
- dummy = p[i];
348
+ p[i];
353
349
354
350
g_BadReadCalled = false ;
355
351
You can’t perform that action at this time.
0 commit comments