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

TibiaCharactersCharacter: use switch case for containsCreaturesWithOf #229

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

phenpessoa
Copy link
Contributor

Instead of iterating over a slice, use a switch case on containsCreaturesWithOf.

This is faster even on the best case scenario for the slice, which is searching for acolyte of darkness (first item in the slice).

@sonarcloud
Copy link

sonarcloud bot commented Jul 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@tobiasehlert tobiasehlert added the go Pull requests that update Go code label Jul 3, 2023
@tobiasehlert tobiasehlert merged commit fe4ded8 into TibiaData:main Jul 3, 2023
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code
Development

Successfully merging this pull request may close these issues.

2 participants