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

Remove name string copies in create_boss() and boss_add_attack() #375

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

LocalSpook
Copy link
Contributor

Functions create_boss() and boss_add_attack() take name strings which they copy with strdup() and store in Boss and Attack. This is unnecessary, because all these names are static constant strings and they're never modified.

They were being unnecessarily copied, but never modified
@Akaricchi Akaricchi merged commit b2de36f into taisei-project:master Nov 29, 2023
5 checks passed
@LocalSpook LocalSpook deleted the attack-and-boss-names branch November 29, 2023 15:14
Akaricchi pushed a commit that referenced this pull request Jan 9, 2024
Functions `create_boss()` and `boss_add_attack()` take name strings
which they copy with `strdup()` and store in `Boss` and `Attack`. This
is unnecessary, because all these names are static constant strings and
they're never modified.
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