Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

The Rest: Listing 28 and 30 light_shape no matching constructor #607

Closed
D-K-E opened this issue May 20, 2020 · 0 comments
Closed

The Rest: Listing 28 and 30 light_shape no matching constructor #607

D-K-E opened this issue May 20, 2020 · 0 comments
Assignees
Milestone

Comments

@D-K-E
Copy link

D-K-E commented May 20, 2020

Book The Rest: Listing 28 and 30 contain the following line:

shared_ptr<hittable> light_shape = make_shared<xz_rect>(213, 343, 227, 
332, 554, 0);

xz_rect requires a pointer as its last argument.

The source code contains the correct, and probably intended, version:

shared_ptr<hittable> light_shape = make_shared<xz_rect>(213, 343, 227, 
         332, 554, make_shared<material>());
@D-K-E D-K-E changed the title The Rest: Listing 28 light_shape no matching constructor The Rest: Listing 28 and 30 light_shape no matching constructor May 20, 2020
@hollasch hollasch added this to the v3.1.2 milestone May 20, 2020
hollasch added a commit that referenced this issue May 22, 2020
The original listing had `0` where it should have had
`make_shared<material>()`.

Resolves #607
@hollasch hollasch self-assigned this May 22, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants