Skip to content

Commit 4a9da46

Browse files
committed
std::begin/end calls in text
1 parent e3b4814 commit 4a9da46

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

books/RayTracingTheNextWeek.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@
989989
left = objects[start];
990990
right = objects[start+1];
991991
} else {
992-
std::sort(objects.begin() + start, objects.begin() + end, comparator);
992+
std::sort(std::begin(objects) + start, std::begin(objects) + end, comparator);
993993

994994
auto mid = start + object_span/2;
995995
left = make_shared<bvh_node>(objects, start, mid);

books/RayTracingTheRestOfYourLife.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@
957957
}
958958

959959
// Sort the samples by x.
960-
std::sort(samples, samples + N, compare_by_x);
960+
std::sort(std::begin(samples), std::end(samples), compare_by_x);
961961

962962
// Find out the sample at which we have half of our area.
963963
double half_sum = sum / 2.0;

0 commit comments

Comments
 (0)