fix memory collector: explicit int types for Dictionary.get() to avoid Variant inference
This commit is contained in:
parent
4169e0c5b6
commit
0f11343c05
1 changed files with 2 additions and 2 deletions
|
|
@ -7,8 +7,8 @@ func collect() -> float:
|
||||||
if meminfo.is_empty():
|
if meminfo.is_empty():
|
||||||
return 0.0
|
return 0.0
|
||||||
|
|
||||||
var total := meminfo.get("MemTotal", 0)
|
var total: int = meminfo.get("MemTotal", 0)
|
||||||
var available := meminfo.get("MemAvailable", 0)
|
var available: int = meminfo.get("MemAvailable", 0)
|
||||||
|
|
||||||
if total == 0:
|
if total == 0:
|
||||||
return 0.0
|
return 0.0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue