webatintel / aquarium

BSD 3-Clause "New" or "Revised" License
24 stars 7 forks source link

Move inclusion of ContextGL.h from .cpp to .h file #133

Closed gyagp closed 4 years ago

gyagp commented 4 years ago

FishModelGL.h actually relies on ContextGL.h, and this CL is to fix this.

hujiajie commented 4 years ago

This looks sub-optimal to me. We should forward declare ContextGL in FishModelGL.h and include ContextGL.h in .cpp. This is also suggested by include-what-you-use.

The benefit is that it reduces the risk of cyclic inclusion, where header guards may result in counter-intuitive build errors.

gyagp commented 4 years ago

Thanks for the comment, and please take another look!

hujiajie commented 4 years ago

LGTM, thanks