You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Signature of getTimeStamp(struct timeval *tv, int secFracDigits) should be getTimeStamp(const struct timeval *tv, int secFracDigits), so we don't have to cast away the const when using this func externally.
Or even better, consider using references to match the general C++ style: getTimeStamp(const struct timeval &tv, int secFracDigits)
The text was updated successfully, but these errors were encountered:
Thanks, @fl4p, for the feedback.
I admit there should be the const qualified before struct timeval *tv.
However, its usage should stay idiomatic. As the struct timeval is from C time API, it is mostly used as a pointer and it is better to keep it so.
Hi,
thanks for this lib.
Signature of
getTimeStamp(struct timeval *tv, int secFracDigits)
should begetTimeStamp(const struct timeval *tv, int secFracDigits)
, so we don't have to cast away the const when using this func externally.Or even better, consider using references to match the general C++ style:
getTimeStamp(const struct timeval &tv, int secFracDigits)
The text was updated successfully, but these errors were encountered: