added a type to Package and added GenericPackage
This forces you to use cast to if you want to force the package to have a specific type
This commit is contained in:
@@ -124,7 +124,7 @@ class GPS {
|
||||
}
|
||||
|
||||
@:allow(kernel.net.Net)
|
||||
private function handlePackage(pack:Package, dist: Float,iface: INetworkInterface) {
|
||||
private function handlePackage(pack:Package<Noise>, dist: Float,iface: INetworkInterface) {
|
||||
switch (pack.type) {
|
||||
case GPSRequest:
|
||||
if (!shouldRespond) return;
|
||||
|
||||
Reference in New Issue
Block a user