ekg / intervaltree

a minimal C++ interval tree implementation
MIT License
222 stars 66 forks source link

return value type fix & change default value type #9

Closed jialeicui closed 9 years ago

jialeicui commented 9 years ago

In function ' intervalStart ' & ' intervalStop ', the return value type may be typename K and change the default value type to std::size_t, so I can use larger value by default

jialeicui commented 9 years ago

I'm writing a small program: load some ip ranges cover IPv4, input an ip address and return the range index. So I thought std::size_t work well with common integer data types. I changed the default value type, it's an easy way to change the default value type by defining inter_type

ekg commented 9 years ago

In the interest of minimizing the namespace of the library, let's just use size_t here. There are only two places it's used. Would you please update the patch? Sorry for the trouble. On Apr 2, 2015 9:16 AM, "Jialei" notifications@github.com wrote:

I'm writing a small program: load some ip ranges cover IPv4, input an ip address and return the range index. So I thought std::size_t work well with common integer data types. I changed the default value type, it's an easy way to change the default value type by defining inter_type

— Reply to this email directly or view it on GitHub https://github.com/ekg/intervaltree/pull/9#issuecomment-88819903.

jialeicui commented 9 years ago

:smile: like this?

ekg commented 9 years ago

Absolutely :)

Thanks!