4 ms·
The sad thing is that there are tons of people doing this in a professional environment. auto and shared_ptr all the things. exceptions everywhere. RTTI. <cstdi
by jakearmitage 4y ago
The sad thing is that there are tons of people doing this in a professional environment. auto and shared_ptr all the things. exceptions everywhere. RTTI. <cstdio> <cmath>.
- melony 4y agoThe code looks fine to me. If you see the newer C++23 guides like Lospinoso's C++ book, auto, shared_ptr, braces default value initializations are all considered best practices now. The only major issue I see is that OP should have used references instead of shared_ptrs for some of the variables.
- TylerGlaiel 4y agoNot a single one of the things he has as a shared pointer needed to be a pointer at all.