Closed maximegmd closed 2 years ago
ok, we can change LPWSTR to LPCWSTR, but what is the benefit of changing a pointer to WCHAR into autopointer?
LPWSTR
LPCWSTR
WCHAR
auto *curr_end_ptr = curr_name;
changed from:
WCHAR *curr_end_ptr = curr_name;
I prefer using explicit variable types - using autopointers (unless it is really needed) just unnecessarily obfuscates the code. also in:
HMODULE peconv::get_module_via_peb(IN OPTIONAL LPCWSTR const module_name)
You wrote: LPCWSTR const - why again const after LPCWSTR? Also in the definition of the same function you wrote without this additional const:
LPCWSTR const
const
HMODULE get_module_via_peb(IN OPTIONAL LPCWSTR module_name = nullptr);
There you go, I have addressed the issues!
ok, we can change
LPWSTR
toLPCWSTR
, but what is the benefit of changing a pointer toWCHAR
into autopointer?changed from:
I prefer using explicit variable types - using autopointers (unless it is really needed) just unnecessarily obfuscates the code. also in:
You wrote:
LPCWSTR const
- why againconst
afterLPCWSTR
? Also in the definition of the same function you wrote without this additionalconst
: