Removed unnecessary copy-ctor and dtor in class ErrorItem - they are generated automatically. Use initializer list in remaining ctors.

This commit is contained in:
PKEuS 2012-10-14 12:42:44 +02:00
parent b9da806492
commit 67fb2dc2c9
2 changed files with 7 additions and 22 deletions

View File

@ -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) 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); lines.append(line.line);
errorId = line.errorId;
inconclusive = line.inconclusive;
severity = line.severity;
summary = line.summary;
message = line.message;
} }
QString ErrorItem::ToString() const QString ErrorItem::ToString() const

View File

@ -93,9 +93,7 @@ public:
class ErrorItem { class ErrorItem {
public: public:
ErrorItem(); ErrorItem();
ErrorItem(const ErrorItem &item);
ErrorItem(const ErrorLine &line); ErrorItem(const ErrorLine &line);
~ErrorItem() { }
/** /**
* @brief Convert error item to string. * @brief Convert error item to string.