Skip to content

Commit 66aabf0

Browse files
authored
Merge pull request #30 from 5cript/feat/inheritable-node
Allowed inheritance of node.
2 parents 4642367 + 5d4404a commit 66aabf0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/interval-tree/interval_tree.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ namespace lib_interval_tree
194194
typename interval_type_ = interval<numerical_type, closed>>
195195
class node
196196
{
197-
private:
197+
protected:
198198
using node_type = node<numerical_type, interval_type_>;
199199

200200
public:
@@ -226,7 +226,7 @@ namespace lib_interval_tree
226226
, color_{rb_color::fail}
227227
{}
228228

229-
~node()
229+
virtual ~node()
230230
{}
231231

232232
interval_type const* interval() const
@@ -314,7 +314,7 @@ namespace lib_interval_tree
314314
return interval_.high();
315315
}
316316

317-
private:
317+
protected:
318318
void set_interval(interval_type const& ival)
319319
{
320320
interval_ = ival;
@@ -335,7 +335,7 @@ namespace lib_interval_tree
335335
}
336336
}
337337

338-
private:
338+
protected:
339339
interval_type interval_;
340340
value_type max_;
341341
node* parent_;

0 commit comments

Comments
 (0)