gritzko / ron

(dated, see the site) Replicated Object Notation, a distributed live data format, golang/ragel lib
http://replicated.cc
Apache License 2.0
360 stars 7 forks source link

Unreachable code #32

Open lambdafu opened 6 years ago

lambdafu commented 6 years ago

I'm not a Go expert, but aren't the three else clauses all identical?

func (a UUID) SameAs(b UUID) bool {
    if a.Value() != b.Value() {
        return false
    } else if a.Origin() == b.Origin() {
        return true
    } else if (a.Origin()^b.Origin())&INT60_FULL != 0 {
        return false
    } else {
        return a.Origin()&INT60_FULL == b.Origin()&INT60_FULL
    }
}