diff --git a/gui/functioncontractdialog.cpp b/gui/functioncontractdialog.cpp index c536398e0..0ed7c1ad5 100644 --- a/gui/functioncontractdialog.cpp +++ b/gui/functioncontractdialog.cpp @@ -10,22 +10,22 @@ static QString formatFunctionName(QString f) return f; } -FunctionContractDialog::FunctionContractDialog(QWidget *parent, QString name, QString expects) : +FunctionContractDialog::FunctionContractDialog(QWidget *parent, const QString &name, const QString &expects) : QDialog(parent), - ui(new Ui::FunctionContractDialog) + mUi(new Ui::FunctionContractDialog) { - ui->setupUi(this); - ui->functionName->setText(formatFunctionName(name)); - ui->expects->setPlainText(expects); + mUi->setupUi(this); + mUi->functionName->setText(formatFunctionName(name)); + mUi->expects->setPlainText(expects); } FunctionContractDialog::~FunctionContractDialog() { - delete ui; + delete mUi; } QString FunctionContractDialog::getExpects() const { - return ui->expects->toPlainText(); + return mUi->expects->toPlainText(); } diff --git a/gui/functioncontractdialog.h b/gui/functioncontractdialog.h index dcd2612cd..4f4863041 100644 --- a/gui/functioncontractdialog.h +++ b/gui/functioncontractdialog.h @@ -11,11 +11,11 @@ class FunctionContractDialog : public QDialog { Q_OBJECT public: - explicit FunctionContractDialog(QWidget *parent, QString name, QString expects); + explicit FunctionContractDialog(QWidget *parent, const QString &name, const QString &expects); ~FunctionContractDialog(); QString getExpects() const; private: - Ui::FunctionContractDialog *ui; + Ui::FunctionContractDialog *mUi; }; #endif // FUNCTIONCONTRACTDIALOG_H diff --git a/gui/projectfile.h b/gui/projectfile.h index 6dc958f24..426d881d9 100644 --- a/gui/projectfile.h +++ b/gui/projectfile.h @@ -201,7 +201,7 @@ public: mMaxCtuDepth = maxCtuDepth; } - const std::map getFunctionContracts() const { + const std::map& getFunctionContracts() const { return mFunctionContracts; }