From 4e27937924766948d7ff9200f04a37fe4d59018c Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Thu, 2 Jun 2011 00:32:53 +0200 Subject: Arbitrary code cleanups Just some stuff that piles up while "looking" at the code, which eventually gets annoying to ignore while staging real changes. * Replaced a few NULL occurrences with 0 * Rely on default parameter for std::vector::resize. * Replaced a few "" with std::string() * Prefer .empty() to == "" * Removed a few comparisons with NULL * Don't check pointers before deleting them * Removed a bunch of redundant semicolons * Made some global variables static (local to their compilation unit) * Prefer prefix ++/-- operators to postfix versions when possible * Corrected location of a comment --- src/client.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index f2d3222f..5736cec4 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -214,7 +214,7 @@ Client::Client(const Options &options): initConfiguration(); chatLogger = new ChatLogger; - if (options.chatLogDir == "") + if (options.chatLogDir.empty()) chatLogger->setLogDir(mLocalDataDir + std::string("/logs/")); else chatLogger->setLogDir(options.chatLogDir); @@ -1020,8 +1020,8 @@ int Client::exec() } void Client::showOkDialog(const std::string &title, - const std::string &message, - State state) + const std::string &message, + State state) { OkDialog *okDialog = new OkDialog(title, message); okDialog->addActionListener(this); -- cgit v1.2.3-70-g09d2