[Kde-games-devel] KGameSvgDocument

Alexander Sopicki nangkar at gmx.info
Tue Mar 27 10:36:05 CEST 2007


Yes that should work just as expected. So removing the assignment should 
be sufficient. As I said: Haven't done any C++ for while. :)

Burkhard Lehner schrieb:
> Hi there,
>
> I haven't had a look into the code, but maybe I can help here, too:
>
> 2007/3/27, Alexander Sopicki <nangkar at gmx.info 
> <mailto:nangkar at gmx.info>>:
>
>     Hi, Mark!
>
>     I am not an expert of C++ but I think the problem is the following
>     assignment in tsvgdigits.cpp:
>
>     m_svgDOM = KGameSvgDocument();
>
>
> This looks somewhat strange to me. A temporary object of 
> KGameSvgDocument is created (using the default constructor), then 
> assigned to m_svgDOM variable, and is thrown away afterwards (since it 
> is only a temporary object).
>
> Wouldn't the following also work? (Haven't seen the code, so I don't 
> know anything about the context.)
>
> KGameSvgDocument m_svgDOM;
>
> Keep in mind NOT to use empty parenthesis behind m_svgDOM, because the 
> compiler will misunderstand that! (That's an inconsistency in C++.)
>
> Burkhard
> ------------------------------------------------------------------------
>
> _______________________________________________
> kde-games-devel mailing list
> kde-games-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-games-devel
>   



More information about the kde-games-devel mailing list