oakmound / oak

A pure Go game engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change event.CID to an alias of int.

lolbinarycat opened this issue · comments

Instead of type CID int have type CID = int.
The reason for this is of course the fact that they are use pretty much interchangeably throughout the code.

I do admit that the whole int versus CID thing is pretty annoying.
However due to the existence of https://github.com/oakmound/oak/blob/master/event/cid.go#L18 its probably something to revisit with the push to 3.0

I'm not 100% sure what you're saying, but if oak was changed to only ever use CID and never int, there would be no need for this change.

Taking this issue in isolation-- to clarify: there are methods on CID, so it can't be an alias as you can't add methods to built in types.

Using CID more often is a preferable approach.

Yeah, that makes sense.