Function rcutils_get_zero_initialized_string_map

Function Documentation

rcutils_string_map_t rcutils_get_zero_initialized_string_map()

Return an empty string map struct.

This function returns an empty and zero initialized string map struct.

Example:

// Do not do this:
// rcutils_string_map_t foo;
// rcutils_string_map_fini(&foo); // undefined behavior!

// Do this instead:
rcutils_string_map_t bar = rcutils_get_zero_initialized_string_map();
rcutils_string_map_fini(&bar); // ok