Remove boost foreach macro
[novacoin.git] / src / qt / multisigdialog.cpp
index 97e49cf..507248f 100644 (file)
 #include "util.h"
 #include "wallet.h"
 #include "walletmodel.h"
-
-#ifdef USE_LEVELDB
 #include "txdb-leveldb.h"
-#else
-#include "txdb-bdb.h"
-#endif
 
 MultisigDialog::MultisigDialog(QWidget *parent) : QWidget(parent), ui(new Ui::MultisigDialog), model(0)
 {
@@ -347,15 +342,14 @@ void MultisigDialog::on_transaction_textChanged()
     {
         ss >> tx;
     }
-    catch(std::exception &e)
+    catch(const std::exception&)
     {
-        (void)e;
         return;
     }
 
     // Fill input list
     int index = -1;
-    BOOST_FOREACH(const CTxIn& txin, tx.vin)
+    for (const CTxIn& txin : tx.vin)
     {
         uint256 prevoutHash = txin.prevout.hash;
         addInput();
@@ -370,7 +364,7 @@ void MultisigDialog::on_transaction_textChanged()
 
     // Fill output list
     index = -1;
-    BOOST_FOREACH(const CTxOut& txout, tx.vout)
+    for (const CTxOut& txout : tx.vout)
     {
         CScript scriptPubKey = txout.scriptPubKey;
         CTxDestination addr;
@@ -418,9 +412,8 @@ void MultisigDialog::on_signTransactionButton_clicked()
     {
         ss >> tx;
     }
-    catch(std::exception &e)
+    catch(const std::exception&)
     {
-        (void)e;
         return;
     }
     CTransaction mergedTx(tx);
@@ -438,7 +431,7 @@ void MultisigDialog::on_signTransactionButton_clicked()
         tempTx.vin.push_back(mergedTx.vin[i]);
         tempTx.FetchInputs(txdb, unused, false, false, mapPrevTx, fInvalid);
 
-        BOOST_FOREACH(const CTxIn& txin, tempTx.vin)
+        for (const CTxIn& txin : tempTx.vin)
         {
             const uint256& prevHash = txin.prevout.hash;
             if(mapPrevTx.count(prevHash) && mapPrevTx[prevHash].second.vout.size() > txin.prevout.n)
@@ -538,9 +531,8 @@ void MultisigDialog::on_sendTransactionButton_clicked()
     {
         ssData >> tx;
     }
-    catch(std::exception &e)
+    catch(const std::exception&)
     {
-        (void)e;
         return;
     }
     uint256 txHash = tx.GetHash();