Skip to content

Commit

Permalink
Compile on targets where c_char ≠ i8 (#403)
Browse files Browse the repository at this point in the history
Fix function which took a i8 where c_char is more correct. Fixes compilation where those two types aren't equivalent (ex: aarch64)
  • Loading branch information
AdminXVII authored May 17, 2024
1 parent c509f9f commit ede2291
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rclrs/src/parameter/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ fn get_parameters(req: GetParameters_Request, map: &ParameterMap) -> GetParamete
}

fn list_parameters(req: ListParameters_Request, map: &ParameterMap) -> ListParameters_Response {
let check_parameter_name_depth = |substring: &[i8]| {
let check_parameter_name_depth = |substring: &[std::os::raw::c_char]| {
if req.depth == ListParameters_Request::DEPTH_RECURSIVE {
return true;
}
u64::try_from(substring.iter().filter(|c| **c == ('.' as i8)).count()).unwrap() < req.depth
u64::try_from(substring.iter().filter(|c| **c == ('.' as _)).count()).unwrap() < req.depth
};
let names: Sequence<_> = map
.storage
Expand Down

0 comments on commit ede2291

Please sign in to comment.