From 67fb2dc2c9e9e7aef0fcb6cbf9b4adb0525d2294 Mon Sep 17 00:00:00 2001 From: PKEuS Date: Sun, 14 Oct 2012 12:42:44 +0200 Subject: [PATCH] Removed unnecessary copy-ctor and dtor in class ErrorItem - they are generated automatically. Use initializer list in remaining ctors. --- gui/erroritem.cpp | 27 +++++++-------------------- gui/erroritem.h | 2 -- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/gui/erroritem.cpp b/gui/erroritem.cpp index 5e2d9e51d..14828147a 100644 --- a/gui/erroritem.cpp +++ b/gui/erroritem.cpp @@ -24,29 +24,16 @@ ErrorItem::ErrorItem() { } -ErrorItem::ErrorItem(const ErrorItem &item) -{ - file = item.file; - file0 = item.file0; - files = item.files; - lines = item.lines; - errorId = item.errorId; - inconclusive = item.inconclusive; - severity = item.severity; - summary = item.summary; - message = item.message; -} - ErrorItem::ErrorItem(const ErrorLine &line) + : file(line.file) + , files(line.file) + , errorId(line.errorId) + , severity(line.severity) + , inconclusive(line.inconclusive) + , summary(line.summary) + , message(line.message) { - file = line.file; - files.append(line.file); lines.append(line.line); - errorId = line.errorId; - inconclusive = line.inconclusive; - severity = line.severity; - summary = line.summary; - message = line.message; } QString ErrorItem::ToString() const diff --git a/gui/erroritem.h b/gui/erroritem.h index 705f856ae..b9127ed0e 100644 --- a/gui/erroritem.h +++ b/gui/erroritem.h @@ -93,9 +93,7 @@ public: class ErrorItem { public: ErrorItem(); - ErrorItem(const ErrorItem &item); ErrorItem(const ErrorLine &line); - ~ErrorItem() { } /** * @brief Convert error item to string.