D11779: General Code clean-up

Fabian Kosmale noreply at phabricator.kde.org
Thu Mar 29 12:45:40 UTC 2018


fabiank created this revision.
Restricted Application added a reviewer: KDE Games.
Restricted Application added a subscriber: KDE Games.
fabiank requested review of this revision.

REVISION SUMMARY
  simplify if condition
  
  always initialize variable
  
  directly initialize variables
  
  remove dead code
  
  reduce variable scope, remove dead comments
  
  remove declared, but unimplemented function remove unused global variable
  
  removed unused member, removed member which was only ever read, never written
  
  remove unnecessary forward declaration
  
  remove declaration of struct that is defined below
  
  remove redundant cast convert malloc + memset to calloc
  
  use bool literals (clang-tidy)
  
  use nullptr instead of 0 (clang-tidy)

TEST PLAN
  Manual regression testing: code still compiles, games still run, and solver can
  win the game

REPOSITORY
  R410 KPatience

BRANCH
  remove_dead_code

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

AFFECTED FILES
  clock.cpp
  dealer.cpp
  dealer.h
  dealerinfo.h
  freecell.cpp
  gameselectionscene.cpp
  gamestate.h
  hint.h
  idiot.cpp
  klondike.cpp
  klondike.h
  libkcardgame/kabstractcarddeck.cpp
  libkcardgame/kabstractcarddeck.h
  libkcardgame/kcard.cpp
  libkcardgame/kcard.h
  libkcardgame/kcarddeck.h
  libkcardgame/kcardpile.cpp
  libkcardgame/kcardpile.h
  libkcardgame/kcardscene.cpp
  libkcardgame/kcardscene.h
  libkcardgame/kcardtheme.cpp
  libkcardgame/kcardthemewidget.cpp
  libkcardgame/kcardthemewidget.h
  libkcardgame/kcardthemewidget_p.h
  main.cpp
  mainwindow.cpp
  patsolve/clocksolver.cpp
  patsolve/fortyeightsolver.cpp
  patsolve/fortyeightsolver.h
  patsolve/freecellsolver.cpp
  patsolve/golfsolver.h
  patsolve/grandfsolver.cpp
  patsolve/grandfsolver.h
  patsolve/gypsysolver.cpp
  patsolve/idiotsolver.cpp
  patsolve/klondikesolver.cpp
  patsolve/memory.cpp
  patsolve/memory.h
  patsolve/patsolve.cpp
  patsolve/patsolve.h
  patsolve/spidersolver.cpp
  patsolve/yukonsolver.cpp
  renderer.cpp
  renderer.h
  soundengine.h

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


More information about the kde-games-devel mailing list