From 0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 29 May 2015 14:30:20 +0300 Subject: Add strong typed int type BeingId. --- src/gui/windows/buyselldialog.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/windows/buyselldialog.cpp') diff --git a/src/gui/windows/buyselldialog.cpp b/src/gui/windows/buyselldialog.cpp index 15d4165f3..bdd28b000 100644 --- a/src/gui/windows/buyselldialog.cpp +++ b/src/gui/windows/buyselldialog.cpp @@ -35,7 +35,7 @@ BuySellDialog::DialogList BuySellDialog::dialogInstances; -BuySellDialog::BuySellDialog(const int npcId) : +BuySellDialog::BuySellDialog(const BeingId npcId) : // TRANSLATORS: shop window name Window(_("Shop"), Modal_false, nullptr, "buysell.xml"), ActionListener(), @@ -50,7 +50,7 @@ BuySellDialog::BuySellDialog(const std::string &nick) : // TRANSLATORS: shop window name Window(_("Shop"), Modal_false, nullptr, "buysell.xml"), ActionListener(), - mNpcId(-1), + mNpcId(BeingId_negOne), mNick(nick), mBuyButton(nullptr) { @@ -128,14 +128,14 @@ void BuySellDialog::action(const ActionEvent &event) const std::string &eventId = event.getId(); if (eventId == "Buy") { - if (mNpcId != -1) + if (mNpcId != BeingId_negOne) npcHandler->buy(mNpcId); else buySellHandler->requestSellList(mNick); } else if (eventId == "Sell") { - if (mNpcId != -1) + if (mNpcId != BeingId_negOne) npcHandler->sell(mNpcId); else buySellHandler->requestBuyList(mNick); -- cgit v1.2.3-70-g09d2