Improve the code by static code analysis [3/3]: Styleamule-svn-r10784
commit789943b05efd6be4f2c9303a76624bd577913606
authorupstream svn <svn@amule.org>
Fri, 11 May 2012 18:38:58 +0000 (11 18:38 +0000)
committerDévai Tamás <gonosztopi@amule.org>
Fri, 11 May 2012 20:10:11 +0000 (11 20:10 +0000)
tree4e73f35912cfa51b93e586ac7694f490425c7f6b
parente92c9e810d973e4a1e0a44674ac6754e439094c9
Improve the code by static code analysis [3/3]: Style

Using the results cppcheck gave on the aMule source tree, the following style
changes were made:

- Use C++-style type-casts instead of C-style casts for pointer casting. This
  improves code readability and gives a better understanding on what's actually
  happening.
- Initialize class member variables in the constructor to prevent accidentally
  using uninitialized variables.
- Const-ness fixes here and there. This reduces the need of type-castings and
  improves object safety by preventing accidentally modifying an object that
  was meant to be read-only.
84 files changed:
.svn-revision
src/BaseClient.cpp
src/ChatSelector.cpp
src/ClientRef.h
src/ClientTCPSocket.cpp
src/ClientUDPSocket.cpp
src/CommentDialogLst.cpp
src/DownloadClient.cpp
src/DownloadListCtrl.cpp
src/ECSpecialCoreTags.cpp
src/ECSpecialMuleTags.cpp
src/EMSocket.cpp
src/ExternalConn.cpp
src/ExternalConn.h
src/ExternalConnector.cpp
src/FileDetailListCtrl.cpp
src/FriendListCtrl.cpp
src/GenericClientListCtrl.cpp
src/GuiEvents.cpp
src/HTTPDownload.cpp
src/IPFilter.cpp
src/KadDlg.cpp
src/KnownFile.cpp
src/KnownFile.h
src/LibSocket.h
src/LibSocketAsio.cpp
src/LibSocketWX.cpp
src/ListenSocket.cpp
src/Logger.cpp
src/MemFile.cpp
src/MuleGifCtrl.cpp
src/MuleListCtrl.cpp
src/Packet.cpp
src/PartFile.cpp
src/PartFile.h
src/PartFileConvert.cpp
src/Preferences.cpp
src/PrefsUnifiedDlg.cpp
src/Proxy.cpp
src/RC4Encrypt.h
src/SearchDlg.cpp
src/SearchFile.h
src/SearchList.cpp
src/SearchListCtrl.cpp
src/Server.h
src/ServerConnect.cpp
src/ServerList.cpp
src/ServerListCtrl.cpp
src/ServerSocket.cpp
src/ServerUDPSocket.cpp
src/SharedFilesCtrl.cpp
src/SharedFilesWnd.cpp
src/StatTree.cpp
src/StatTree.h
src/Statistics.cpp
src/TextClient.cpp
src/TextClient.h
src/UPnPBase.cpp
src/UPnPBase.h
src/UpDownClientEC.h
src/UploadClient.cpp
src/UploadQueue.cpp
src/UserEvents.h
src/amule-remote-gui.cpp
src/amule-remote-gui.h
src/amule.cpp
src/amuleAppCommon.cpp
src/amuleDlg.h
src/amuleIPV4Address.h
src/kademlia/kademlia/Indexed.cpp
src/kademlia/kademlia/Search.cpp
src/kademlia/net/KademliaUDPListener.cpp
src/kademlia/routing/RoutingZone.cpp
src/libs/ec/cpp/ECSocket.cpp
src/libs/ec/cpp/ECSpecialTags.h
src/libs/ec/cpp/ECTag.cpp
src/utils/aLinkCreator/src/alcframe.cpp
src/utils/aLinkCreator/src/alcframe.h
src/utils/aLinkCreator/src/md4.cpp
src/utils/cas/cas.c
src/utils/wxCas/src/wxcasprefs.cpp
src/webserver/src/WebServer.cpp
src/webserver/src/php_amule_lib.cpp
src/webserver/src/php_syntree.cpp