From 505d65fa57be4af4ecf5b1b5c6582403e984bc19 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 22 Dec 2015 17:23:36 +0300 Subject: Add restrict keyword in some functions in whoisonline. --- src/gui/windows/whoisonline.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/gui/windows/whoisonline.cpp') diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp index 1651f4ea0..f6d7173d0 100644 --- a/src/gui/windows/whoisonline.cpp +++ b/src/gui/windows/whoisonline.cpp @@ -488,13 +488,15 @@ void WhoIsOnline::loadWebList() mEnemy.clear(); } -size_t WhoIsOnline::memoryWrite(void *ptr, size_t size, - size_t nmemb, FILE *stream) +size_t WhoIsOnline::memoryWrite(void *restrict ptr, + size_t size, + size_t nmemb, + FILE *restrict stream) { if (!stream) return 0; - WhoIsOnline *const wio = reinterpret_cast(stream); + WhoIsOnline *restrict const wio = reinterpret_cast(stream); const size_t totalMem = size * nmemb; wio->mMemoryBuffer = static_cast(realloc(wio->mMemoryBuffer, static_cast(wio->mDownloadedBytes) + totalMem)); -- cgit v1.2.3-70-g09d2