Re: winedump: code cleanup
"Mikhail Maroukhine" <mikolg(a)yandex.ru> writes:
- winedump/search.c::get_type - cleanup variable usage
That's not much better. It would be cleaner to stop abusing the passed argument as a local variable. -- Alexandre Julliard julliard(a)winehq.org
On Tue, 30 Mar 2010 22:36:21 +0700, Alexandre Julliard <julliard(a)winehq.org> wrote:
"Mikhail Maroukhine" <mikolg(a)yandex.ru> writes:
- winedump/search.c::get_type - cleanup variable usage
That's not much better. It would be cleaner to stop abusing the passed argument as a local variable.
Hello, Could you clear a little what do you mean under "stop abusing"? I've removed incorrect usage of constness in declaration for the variable that is changed for sure. I've send "try 2" patch with additional correction and extended log message. Please check it. Thanks, Mikhail
"Mikhail Maroukhine" <mikolg(a)yandex.ru> writes:
Hello,
Could you clear a little what do you mean under "stop abusing"? I've removed incorrect usage of constness in declaration for the variable that is changed for sure. I've send "try 2" patch with additional correction and extended log message.
I mean your new origProtoRef variable (which BTW uses a completely different naming convention from the rest of the function) to work around the fact that the argument is modified. Much better to use a properly named local variable to store results and not modify the argument. -- Alexandre Julliard julliard(a)winehq.org
oops. Absolutely agree. Thanks for the comment. Will fix it. Thanks, Mikhail On Fri, 02 Apr 2010 00:29:16 +0700, Alexandre Julliard <julliard(a)winehq.org> wrote:
"Mikhail Maroukhine" <mikolg(a)yandex.ru> writes:
Hello,
Could you clear a little what do you mean under "stop abusing"? I've removed incorrect usage of constness in declaration for the variable that is changed for sure. I've send "try 2" patch with additional correction and extended log message.
I mean your new origProtoRef variable (which BTW uses a completely different naming convention from the rest of the function) to work around the fact that the argument is modified. Much better to use a properly named local variable to store results and not modify the argument.
-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
participants (2)
-
Alexandre Julliard -
Mikhail Maroukhine