Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a problem to inicializate spatial_data #1151

Merged
merged 2 commits into from
Feb 25, 2015

Conversation

mgesto
Copy link
Contributor

@mgesto mgesto commented Feb 12, 2015

No description provided.

@taketwo
Copy link
Member

taketwo commented Feb 25, 2015

There is a special syntax to zero-initialize an array allocated with new, see here.

In our case it would be as simple as:

kiss_fft_scalar * spatial_data = new kiss_fft_scalar[nbins]();

Please also change the comment above to explain what's going on, because this is not a very well-known feature of C++ and as such may be confusing for those who read the code.

@mgesto
Copy link
Contributor Author

mgesto commented Feb 25, 2015

Ok, thanks, now is changued, maybe you can improve the coment above.

taketwo added a commit that referenced this pull request Feb 25, 2015
Fix a problem to inicializate  spatial_data
@taketwo taketwo merged commit 3fd9b08 into PointCloudLibrary:master Feb 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants