On 2/5/19 9:02 AM, Isira Seneviratne wrote:
On Tue, Feb 5, 2019 at 1:26 PM Nikolay Sivov <nsivov@codeweavers.com mailto:nsivov@codeweavers.com> wrote:
I don't think hardcoded sizes like that are better, because you'll always need to double check with actual string.
What is there to double check, though? It seems to be fairly straight forward.
Magic constants are bad, one has to follow the code flow to figure it out. Afair we even had a janitorial task to remove magic constants.
If you still want to get rid of the strlen do it like Alex Henri did and use: ARRAY_SIZE(wstr) - 1.
bye michael