aboutsummaryrefslogtreecommitdiffstats
path: root/core/helpers.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-04-22 10:13:09 -0700
committerChris Robinson <[email protected]>2021-04-22 10:13:09 -0700
commit6ae12d0b8543934a320887729f9e82aa1a56865b (patch)
treea131ded1654664c37ee0e7e63e8ed61bc2d39ccd /core/helpers.cpp
parentd2f587ee23f3e538d6d2744b9acae2e15e047db8 (diff)
Avoid over-long lines
Diffstat (limited to 'core/helpers.cpp')
-rw-r--r--core/helpers.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/helpers.cpp b/core/helpers.cpp
index c03c3b62..a2f1a6c9 100644
--- a/core/helpers.cpp
+++ b/core/helpers.cpp
@@ -40,9 +40,12 @@ const PathNamePair &GetProcBinary()
if(procbin) return *procbin;
auto fullpath = al::vector<WCHAR>(256);
- DWORD len;
- while((len=GetModuleFileNameW(nullptr, fullpath.data(), static_cast<DWORD>(fullpath.size()))) == fullpath.size())
+ DWORD len{GetModuleFileNameW(nullptr, fullpath.data(), static_cast<DWORD>(fullpath.size()))};
+ while(len == fullpath.size())
+ {
fullpath.resize(fullpath.size() << 1);
+ len = GetModuleFileNameW(nullptr, fullpath.data(), static_cast<DWORD>(fullpath.size()));
+ }
if(len == 0)
{
ERR("Failed to get process name: error %lu\n", GetLastError());