-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use one copy for continuous area instead of loop copy #312
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm with minor comment.
|
||
ret = rcutils_array_list_get(&list, 0, &ret_data); | ||
EXPECT_EQ(RCUTILS_RET_OK, ret) << rcutils_get_error_string().str; | ||
EXPECT_EQ((uint32_t)2, ret_data) << rcutils_get_error_string().str; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we would want to call the following after this,
- rcutils_array_list_remove(&list, 0)
- rcutils_array_list_get_size(&list, &size)
to make sure corner case which is to remove last entry from the array_list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reasonable 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've got one small thing to fix. Also, can you please run this test under valgrind
just to ensure we aren't accessing any data out-of-bounds? Once those two things are done, I'm happy to approve.
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
Signed-off-by: Chen Lihui <Lihui.Chen@sony.com>
b3085ff
to
524b621
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now. Thanks for iterating. Will run CI on it next.
Hi, @clalancette |
No, I don't think so. Those tests have been flaky in the nightlies for a while. This one just fell off of my radar, thanks for the ping. I'm going to go ahead and merge this. |
Signed-off-by: Chen Lihui lihui.chen@sony.com