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

Some of the comparisons can be simplified: #1661

Closed
chino117 opened this issue Jan 20, 2021 · 0 comments
Closed

Some of the comparisons can be simplified: #1661

chino117 opened this issue Jan 20, 2021 · 0 comments

Comments

@chino117
Copy link
Contributor

Some of the comparisons can be simplified:

func isPriority(index1 int, index2 int) bool {
	if index1 > -1 {
		if index2 > -1 {
			return index1 >= index2
		} else {
			return false
		}
	}
	return index2 > -1
}

Originally posted by @SyntaxNode in #1648 (comment)

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

No branches or pull requests

1 participant