Skip to content

Commit c7e450e

Browse files
xaionaro@dx.centerxaionaro@dx.center
authored andcommitted
fix: remove remaining int32() casts in sensor examples
Missed two call sites in event-loop and list-sensors that still cast sensor.Type to int32 for DefaultSensor (which now takes Type).
1 parent 4882a56 commit c7e450e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

examples/sensor/event-loop/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func probeSensor(
3535
}
3636
}()
3737

38-
s := mgr.DefaultSensor(int32(sensorType))
38+
s := mgr.DefaultSensor(sensorType)
3939
name = s.Name()
4040
vendor = s.Vendor()
4141
if name == "" || vendor == "" {

examples/sensor/list-sensors/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func printSensor(mgr *sensor.Manager, label string, sensorType sensor.Type) (ok
3131
}
3232
}()
3333

34-
s := mgr.DefaultSensor(int32(sensorType))
34+
s := mgr.DefaultSensor(sensorType)
3535

3636
// Trigger a method call; if the internal pointer is NULL the NDK
3737
// dereferences a null pointer and Go's signal handler turns it

0 commit comments

Comments
 (0)