Skip to content

Commit 27ffeb8

Browse files
authored
Update README.md
1 parent 4dbd09a commit 27ffeb8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ A C++ header only interval tree implementation, which takes a red black tree as
1515

1616
## Example
1717
```C++
18-
#define INTERVAL_TREE_SAFE_INTERVALS // makes sure that upper_bound > lower_bound (by swapping if neccessary), but is slower. Will become an assert if left out.
1918
// #include "draw.hpp" // to draw tree. this is not header only anymore.
2019
#include "interval_tree.hpp"
2120

@@ -26,7 +25,7 @@ int main()
2625
// interval_tree <interval <int>>;
2726
interval_tree_t <int> tree;
2827

29-
tree.insert({16, 21});
28+
tree.insert(make_safe_interval<int>(21, 16)); // make_safe_interval swaps low and high if not in right order.
3029
tree.insert({8, 9});
3130
tree.insert({25, 30});
3231
tree.insert({5, 8});
@@ -335,4 +334,4 @@ Overlapping intervals have 0 distance.
335334
### value_type size() const
336335
Returns high - low.
337336
### interval join(interval const& other) const
338-
Joins 2 intervals and whatever is inbetween.
337+
Joins 2 intervals and whatever is inbetween.

0 commit comments

Comments
 (0)