On Dienstag 21 April 2009 15:22:17 Pavol Rusnak wrote:
Sascha 'saigkill' Manns wrote:
This is the code from them. BrowserIter &BrowserIter::operator=( const BrowserIter &other ) { m_infBrowser = other.infBrowser(); m_infBrowserIter.node_id = other.infBrowserIter()->node_id; m_infBrowserIter.node = other.infBrowserIter()->node; return ; } What must i change?
Aha! When you overload assignment operator (=), it should end with "return *this;" so it could be chained (eg. a = b = 3). Just insert "*this" between "return" and ";". Now he runs, and i can see the End. He breaks with: testing for serious compiler warnings (using /usr/lib/build/checks-data/check_gcc_output) (using /var/tmp/build-root/.build.log)
I: Program returns random data in a function E: libqinfinity no-return-in-nonvoid-function /usr/src/packages/BUILD/libqinfinity-1.0b1/libqinfinity/browseriter.cpp:140, 134, 128, 122, 111, 105, 99, 93, 87, 81, 75, 69, 63, 57 E: libqinfinity no-return-in-nonvoid-function /usr/src/packages/BUILD/libqinfinity-1.0b1/libqinfinity/browsermodel.cpp:222, 195 Musrt i here place "return *this;" on the End of each functions? -- Sincereley yours Sascha Manns openSUSE Marketing Team openSUSE Build Service openSUSE Features Screening Team Web: http://saschamanns.gulli.to Project-Blog: http://lizards.opensuse.org/author/saigkill Private-Blog: http://saschasbacktrace.blogspot.com