D11814: Getting rid of macros and dead code:

Fabian Kosmale noreply at phabricator.kde.org
Sun Apr 1 18:33:23 UTC 2018


fabiank added inline comments.

INLINE COMMENTS

> aacid wrote in kcardscene.cpp:1253
> This seems like something you would want to keep? (if it compiles)

Well, it doesn't, because multRectSize doesn't exist anymore since efb0f40b7b16fb70d32cecd91dd8d4d9decd61c5 <https://phabricator.kde.org/R410:efb0f40b7b16fb70d32cecd91dd8d4d9decd61c5>. Though, restoring that function (and wrapping it in #if DEBUG_LAYOUT) is of course also an alternative.

> aacid wrote in idiotsolver.cpp:299
> Are you really sure about this? This changes the assert totally

Indeed it does, and for the better I'd say ;-). Before it was an assignment to Wp[i], if and only if asserts were active. The only reason why this assignment didn't cause any issues was that lhs and rhs of the assignment should be the same, as we assert now.

Wp[i] == &W[i][Wlen[i] - 1] is actually an invariant through much of the code base, except when it is temporarily broken when moving cards around (and replacing Wp, Wlen, W and related variables is one of the refactorings I've planned at a later point).

REPOSITORY
  R410 KPatience

REVISION DETAIL
  https://phabricator.kde.org/D11814

To: fabiank, #kde_games
Cc: aacid, #kde_games
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20180401/65c1c4a4/attachment.html>


More information about the kde-games-devel mailing list