News for hackers. Stuff that matters.
Re:How to make Flappy Bird with C++ by ncmncm on Thursday August 25, 2022 @10:57AM (#32594504)
Overuse of shared_ptr is called Java Disease in reviews.

Most programs don't need to use shared_ptr at all.

Side note, there is also no value in making those member functions "protected".

Re:How to make Flappy Bird with C++ by ncmncm on Thursday August 25, 2022 @01:28PM (#32597018)
This program, in particular, has no need for any pointers of any kind. They are all better done as simple value objects.

I have verified this by deleting "#include memory>", all uses of shared_ptr, changing all "->" to ".", and deleting all unary "*".

The window member object is initialized, then, using (drumroll...) member initializer syntax. Most uses of "{}" are better deleted.