3 ms·
> Here is a short snippet of some abstract C++ code. As you can see, that is a code from the Windows DLL I stopped reading at this point. But, ok, I didn't re
by einpoklum 7y ago
> Here is a short snippet of some abstract C++ code. As you can see, that is a code from the Windows DLL
I stopped reading at this point.
But, ok, I didn't really. I also noticed the code was quite dated / inopportune:
* Has a "X-er" class - which probably shouldn't exist in the first place.
* Using raw `delete` and `new`
* Using unions instead of std::variant's
* Using C library calls instead of `<algorithm>` functions (memset vs std::fill)
* Using `rand()` instead of the standard library's facilities (even though it's broken https://www.youtube.com/watch?v=LDPMpc-ENqY&t=329s https://www.youtube.com/watch?v=LDPMpc-ENqY&t=329s)
So... it's outdated and inelegant C++, regardless of any actual errors.