Skip to content
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

Ensure all swri::Subscriber members are initialized #505

merged 5 commits into from Dec 18, 2017


None yet
5 participants
Copy link

commented Dec 13, 2017

Some member variables in swri::Subscriber were uninitialized by default; this ensures all of them are initialized.


This comment has been minimized.

Copy link
Member Author

commented Dec 13, 2017

As long as I'm in here, looking at subscriber_impl.h:73, it appears that if the stamp in a header is 0, this will very quickly cause an overflow of total_latency_. Maybe processHeader should skip the latency check if the header's stamp isn't set?

@@ -75,7 +75,8 @@ class SubscriberImpl
min_latency_ = latency;
max_latency_ = latency;
total_latency_ = latency;
} else {
else {

This comment has been minimized.

Copy link

elliotjo Dec 14, 2017


Recommend undoing these style changes to remain consistent.

This comment has been minimized.

Copy link

pjreed Dec 15, 2017

Author Member

Any opinions on how that check should be handled if the header stamp isn't set?


This comment has been minimized.

Copy link

commented Dec 16, 2017


pjreed added some commits Dec 18, 2017

@pjreed pjreed merged commit 507fbbb into swri-robotics:master Dec 18, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.