Book 2 Listing 17 losing “const”
bvh_node::bvh_node(
std::vector<shared_ptr
may be modified to:
bvh_node::bvh_node(
const std::vector<shared_ptr
Book 1 listing 20 also has a function whose parameters could be trued up with const
Looks like this has already been addressed (bvh_node constructor parameter src_objects).
Regarding the comment about Book 1 listing 20, it appears this is about the hittable_list class. It doesn't mention which function, but we're passing a shared_ptr to hittable_list::hittable_list(), and to hittable_list::add(). In both cases we are not modifying an underlying vector of shared pointers, so it doesn't really apply. In addition, for the single shared pointer of the caller, we want to pass that by value, rather than letting a callee mess with the caller's ref-counted pointer.