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

d.graph: Remove an always true condition #2296

Merged

Conversation

lbartoletti
Copy link
Contributor

alloc returns 0 if num < coors_allocated since to_alloc is assigned with coors_allocated, the condition is always true. So, we can directly assign to_alloc with num + CHUNK

@wenzeslaus wenzeslaus added this to the 8.2.0 milestone Apr 7, 2022
@wenzeslaus wenzeslaus added C Related code is in C enhancement New feature or request labels Apr 8, 2022
@wenzeslaus wenzeslaus merged commit 3c7e0c5 into OSGeo:main Apr 8, 2022
@wenzeslaus wenzeslaus changed the title display/d.graph: remove useless condition d.graph: Remove an always true condition Apr 27, 2022
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Oct 26, 2022
The function returns if `num < coors_allocated` and since `to_alloc` is assigned with `coors_allocated`, the removed condition is always true and thus useless. So, we can directly assign `to_alloc` with `num + CHUNK`.
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
The function returns if `num < coors_allocated` and since `to_alloc` is assigned with `coors_allocated`, the removed condition is always true and thus useless. So, we can directly assign `to_alloc` with `num + CHUNK`.
neteler pushed a commit to nilason/grass that referenced this pull request Nov 7, 2023
The function returns if `num < coors_allocated` and since `to_alloc` is assigned with `coors_allocated`, the removed condition is always true and thus useless. So, we can directly assign `to_alloc` with `num + CHUNK`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C Related code is in C enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants