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 most Coverity Scan performance warnings #3989

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

rouault
Copy link
Member

@rouault rouault commented Jan 7, 2024

No description provided.

@jjimenezshaw
Copy link
Contributor

Now I am curious. Were there performance warnings due to the lack of const?

@rouault
Copy link
Member Author

rouault commented Jan 8, 2024

Now I am curious. Were there performance warnings due to the lack of const?

not directly. But Coverity Scan insists on using std::move() as much as possible. But in some places, I find it a bit dangerous, because it is not immediately obvious that the variable might not be used afterwards. Adding const makes the variable non-moveable, hence std::move() can't be used and the copy assignment operator is used.

I don't believe any of those "fixes" are going to have measurable perf improvements. The main goal is to shut off Coverity Scan.

@jjimenezshaw
Copy link
Contributor

Than makes sense. Thanks!

@rouault rouault merged commit 2428e7d into OSGeo:master Jan 8, 2024
22 checks passed
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