Use unsigned integers where it makes sense.

(or not)
mj-v1.12
domi41 4 years ago
parent 6e1799567c
commit 1e3025b0a1

@ -14,7 +14,7 @@ type PollCandidateResult struct {
Poll *Poll
CandidateID int64 // Issue Index (or internal candidate index, later on)
Position int64 // Two Candidates may share the same Position (perfect equality)
MedianGrade int8
MedianGrade uint8
Tally *PollCandidateTally
CreatedUnix timeutil.TimeStamp
}

@ -24,7 +24,7 @@ type CreateJudgmentResponse struct {
func EmitJudgment(ctx *context.Context) {
judge := ctx.User
grade := int8(ctx.QueryInt("grade")) // 0 if not defined
grade := uint8(ctx.QueryInt("grade")) // 0 if not defined
if grade < 1 {
grade = 0
}

Loading…
Cancel
Save