From: Brian Gerkey <gerkey@ro...> - 2004-05-19 19:41:50
On Wed, 19 May 2004, Cameron Morland wrote:
> If you write a program wherein you run SonarProxy::Print() without
> first running the appropriate PlayerClient::Read(), it prints a set of
> numbers of unpredictable length, since range_count is never
> initialised. There also is a reasonably good chance of a SEGFAULT.
> Consider the attached patch. Is there a better way to fix this?
I think that's a perfectly good fix. It's just good OO programming
practice to initialize all class members in the constructor.
Thanks for the patch, I've absorbed it into CVS.
Brian P. Gerkey gerkey@...
Stanford AI Lab http://ai.stanford.edu/~gerkey