MapForeachValue
Description
Iterate over all stored values by value.
Parameters
| Name | Direction | Description |
|---|---|---|
m |
in,out | Map to iterate over. |
value_var |
in | Name of variable bound to a copy of each stored value. |
Success
The loop body runs once per occupied slot with value_var bound to a copy of the stored value. The body is skipped when m is empty. Mutating the local does not write back into the map.
Failure
The macro itself does not fail. LOG_FATAL via ValidateMap(m) when m is uninitialised or corrupted.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Map.Foreach.c:71:
}
MapForeachValue(&map, value) {
all_value_sum += value;
}
Last updated on