Pass SendCoinsRecipient (208 bytes) by const reference

This commit is contained in:
practicalswift 2017-08-01 23:40:19 +02:00
parent 659c096134
commit d3d946a294
4 changed files with 4 additions and 4 deletions

View file

@ -620,7 +620,7 @@ void PaymentServer::fetchRequest(const QUrl& url)
netManager->get(netRequest); netManager->get(netRequest);
} }
void PaymentServer::fetchPaymentACK(CWallet* wallet, SendCoinsRecipient recipient, QByteArray transaction) void PaymentServer::fetchPaymentACK(CWallet* wallet, const SendCoinsRecipient& recipient, QByteArray transaction)
{ {
const payments::PaymentDetails& details = recipient.paymentRequest.getDetails(); const payments::PaymentDetails& details = recipient.paymentRequest.getDetails();
if (!details.has_payment_url()) if (!details.has_payment_url())

View file

@ -113,7 +113,7 @@ public Q_SLOTS:
void uiReady(); void uiReady();
// Submit Payment message to a merchant, get back PaymentACK: // Submit Payment message to a merchant, get back PaymentACK:
void fetchPaymentACK(CWallet* wallet, SendCoinsRecipient recipient, QByteArray transaction); void fetchPaymentACK(CWallet* wallet, const SendCoinsRecipient& recipient, QByteArray transaction);
// Handle an incoming URI, URI with local file scheme or file // Handle an incoming URI, URI with local file scheme or file
void handleURIOrFile(const QString& s); void handleURIOrFile(const QString& s);

View file

@ -205,7 +205,7 @@ void PaymentServerTests::paymentServerTests()
delete server; delete server;
} }
void RecipientCatcher::getRecipient(SendCoinsRecipient r) void RecipientCatcher::getRecipient(const SendCoinsRecipient& r)
{ {
recipient = r; recipient = r;
} }

View file

@ -26,7 +26,7 @@ class RecipientCatcher : public QObject
Q_OBJECT Q_OBJECT
public Q_SLOTS: public Q_SLOTS:
void getRecipient(SendCoinsRecipient r); void getRecipient(const SendCoinsRecipient& r);
public: public:
SendCoinsRecipient recipient; SendCoinsRecipient recipient;