Skip to content

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

@D-K-E

Description

@D-K-E

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>());

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions