https://codereview.appspot.com/583510045/diff/559490043/lily/axis-group-inter...
File lily/axis-group-interface.cc (right):
https://codereview.appspot.com/583510045/diff/559490043/lily/axis-group-inter...
lily/axis-group-interface.cc:277: Interval_t<vsize> rank_span
(rank_span_int[LEFT], rank_span_int[RIGHT]);
A constructor would clean this up. I tried this:
template <typename T2>
Interval_t (Interval_t<T2> const &src) : Interval_t (src[LEFT], src[RIGHT])
{
}
Having that, both of the following compiled:
Interval_t<vsize> rank_span (g->spanned_rank_interval ());
Interval_t<vsize> rank_span = g->spanned_rank_interval ();
I also tested Interval_t<unsigned char> and the compiler still properly warns
about conversions.
Issue 583510045: axis-group-interface: avoid some cast warnings
(Closed)
Created 4 years, 1 month ago by hanwenn
Modified 4 years, 1 month ago
Reviewers: lemzwerg, Dan Eble
Base URL:
Comments: 1