Skip to content

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).

@sonarqubecloud
Copy link

sonarqubecloud 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
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