Version: 0.3.1 (using KDE 3.1.92 (alpha2, CVS >= 20030921), compiled sources) Compiler: gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk) OS: Linux (i686) release 2.4.21-0.25mdk I've found 3 graphic errors in KSnake of KDE 3.1.92 - The snake is horrible - The letters saying Snake race at the beginning are not "textured" - The icons on the top marking how many lives you have left are also ugly I've looked at the code and nothing important has changed since KDE 3.1.0 and it looks good in it (Mandrake 9.1)
Subject: kdegames/ksnake CVS commit by aacid: Using BarIcon to load icons that are not bar icons is VERY BAD, that fixes bug #65401, fixing my own bugs makes me fell better 8-) Some cleaning at ball.cpp and ball.h, remove empty destructors, use polimorphism and inheritance to remove DumbKillerBall::nextMove() as its code was the same as KillerBall::nextMove() except one line CCMAIL:65401-done@bugs.kde.org M +8 -28 ball.cpp 1.4 M +7 -7 ball.h 1.5 M +5 -5 pixServer.cpp 1.22 M +2 -1 trys.cpp 1.11
dude - I think you made a bad mistake taking out the destructor. If you make the class virtual, then you really should make the destructor virtual as well, especially if you are using polymorphism! Otherwise you are just looking for some bad memory problems. please put it back in.
I don't think so (i can be wrong of course). First, ALL the destructors were empty, even the base class Ball had an empty destructor. Second, even if you don't define the destructor, it is called(see http://www.parashift.com/c++-faq-lite/dtors.html#faq-11.1 it says "A class's destructor (whether or not you explicitly define one) automagically invokes the destructors for member objects.") Third, there is not any object creation in ball.cpp (i mean "new foo"), so why do we need destructors? As i said, i can be wrong, but if i am wrong could you care to explain why so the next time i won't have the same error.
Uhh, found that "make your destructor virtual if your class has any virtual functions" at http://www.parashift.com/c++-faq-lite/virtual-functions.html#faq-20.5 I've changed the code and i've added a virtual empty destructor to Ball and to KillerBall. Do you think it's fine now? Albert.