diff options
author | David Robillard <d@drobilla.net> | 2019-08-17 19:35:57 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-09-07 09:51:48 +0200 |
commit | 27e43183d89aad98f6000ee187b05547776ae4c2 (patch) | |
tree | 53105128fc3a3e7c3d44eb507dc31be83173fc66 | |
parent | 178e747d6b104a255854480f242c3807ac4c54e3 (diff) |
Cleanup: Fix whitespace
-rw-r--r-- | pugl/detail/win.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/pugl/detail/win.c b/pugl/detail/win.c index e763495..9ed1e5d 100644 --- a/pugl/detail/win.c +++ b/pugl/detail/win.c @@ -57,14 +57,14 @@ wndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); static wchar_t* puglUtf8ToWideChar(const char* const utf8) { - const int len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0); - if (len > 0) { - wchar_t* result = (wchar_t*)calloc((size_t)len, sizeof(wchar_t)); - MultiByteToWideChar(CP_UTF8, 0, utf8, -1, result, len); - return result; - } + const int len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0); + if (len > 0) { + wchar_t* result = (wchar_t*)calloc((size_t)len, sizeof(wchar_t)); + MultiByteToWideChar(CP_UTF8, 0, utf8, -1, result, len); + return result; + } - return NULL; + return NULL; } static bool @@ -317,7 +317,7 @@ puglDecodeUTF16(const wchar_t* buf, const int len) { const uint32_t c0 = buf[0]; const uint32_t c1 = buf[0]; - if (c0 >= 0xD800 && c0 < 0xDC00) { + if (c0 >= 0xD800 && c0 < 0xDC00) { if (len < 2) { return 0xFFFD; // Surrogate, but length is only 1 } else if (c1 >= 0xDC00 && c1 <= 0xDFFF) { @@ -327,7 +327,7 @@ puglDecodeUTF16(const wchar_t* buf, const int len) return 0xFFFD; // Unpaired surrogates } - return c0; + return c0; } static void @@ -761,10 +761,10 @@ wndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) double puglGetTime(const PuglWorld* world) { - LARGE_INTEGER count; - QueryPerformanceCounter(&count); - return ((double)count.QuadPart / world->impl->timerFrequency - - world->startTime); + LARGE_INTEGER count; + QueryPerformanceCounter(&count); + return ((double)count.QuadPart / world->impl->timerFrequency - + world->startTime); } PuglStatus |