sample-apps-for-matter-android icon indicating copy to clipboard operation
sample-apps-for-matter-android copied to clipboard

Type safety between deviceId and devicePtr

Open jonsmirl opened this issue 2 years ago • 2 comments

It would be helpful to have type safety between deviceId and devicePtr since it is very easy to pass in the wrong one

jonsmirl avatar Jan 25 '23 13:01 jonsmirl

Makes sense. On the TODO list.

pierredelisle avatar Feb 07 '23 03:02 pierredelisle

Internally in GHSAFM, we could use Kotlin value classes

@JvmInline
value class DeviceId(val value: Long)

@JvmInline
value class DevicePointer(val value: Long)

tetedoie avatar Mar 27 '23 11:03 tetedoie