GSoC/GCI Archive
Google Code-in 2013 KDE

Fix uninitialized member variables in Marble

completed by: Benjamin Kaiser

mentors: Torsten Rahn, Dennis Nienhüser

There's a list of uninitialized class member variables at http://pastebin.kde.org/plplaqggp

  • Go through the list and fix each of them (i.e. initialize them in the initializer list)
  • Make sure to use the same order as in the definition (you'll get compiler warnings when mixing that up)
  • For *Private classes, check if the initialization is currently done in the parent class and can be moved to the Private class, e.g.
class FooPrivate {
public:
  int m_someValue;
  FooPrivate { }
};
class Foo {
public:
  Foo() : d(new FooPrivate) { d->m_someValue = 42; }
}

could remove d->m_someValue = 42; and instead call FooPrivate : m_someValue( 42 ) { }


  • Check that Marble still runs fine and all unit tests succeed. Create a review request for your changes at https://git.reviewboard.kde.org