lighttransport / nanort

NanoRT, single header only modern ray tracing kernel.
MIT License
1.07k stars 89 forks source link

Remove un-used and broken TriangleSAHPred<T>& operator= method #83

Closed Tyler799 closed 4 months ago

Tyler799 commented 4 months ago

This method was a problem previously, but GCC14 notices that it cannot work given that vertex_stridebytes is const.

It's not used, so just remove it.

syoyo commented 4 months ago

operator= may be used in some user code. Adding 'mutable' to vertex_stride_bytes_ would be a recommend way for the fix.

syoyo commented 4 months ago

I am changing my mind. copy-assignment operator for class having const variables are troublesome and probably no one actually uses copy-assignment operator of TriangleSAHPred class.

https://stackoverflow.com/questions/3658854/does-it-make-sense-to-implement-the-copy-assignment-operator-in-a-class-with-all

So merged PR. Thanks!