changeset 430:8aef713b2c4b draft

Visual C++ compatibility fixes
author Gavin Andresen <gavinandresen@gmail.com>
date Thu, 10 Feb 2011 19:24:22 -0500
parents 71be2db4bc99
children 4f6be491cf79
files rpc.cpp serialize.h
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/rpc.cpp
+++ b/rpc.cpp
@@ -1015,13 +1015,13 @@
         for (map<uint256, CWalletTx>::iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
         {
             CWalletTx* wtx = &((*it).second);
-            txByTime.insert(make_pair(wtx->GetTxTime(), TxPair(wtx, 0)));
+            txByTime.insert(make_pair(wtx->GetTxTime(), TxPair(wtx, (CAccountingEntry*)0)));
         }
         list<CAccountingEntry> acentries;
         walletdb.ListAccountCreditDebit(strAccount, acentries);
         foreach(CAccountingEntry& entry, acentries)
         {
-            txByTime.insert(make_pair(entry.nTime, TxPair(0, &entry)));
+            txByTime.insert(make_pair(entry.nTime, TxPair((CWalletTx*)0, &entry)));
         }
 
         // Now: iterate backwards until we have nCount items to return:
@@ -1762,7 +1762,7 @@
         map<string, string> mapHeaders;
         string strRequest;
 
-        boost::thread api_caller(ReadHTTP, ref(stream), ref(mapHeaders), ref(strRequest));
+        boost::thread api_caller(ReadHTTP, boost::ref(stream), boost::ref(mapHeaders), boost::ref(strRequest));
         if (!api_caller.timed_join(boost::posix_time::seconds(GetArg("-rpctimeout", 30))))
         {   // Timed out:
             acceptor.cancel();
--- a/serialize.h
+++ b/serialize.h
@@ -763,6 +763,8 @@
     typedef typename base::value_type value_type;
     secure_allocator() throw() {}
     secure_allocator(const secure_allocator& a) throw() : base(a) {}
+    template <typename U>
+    secure_allocator(const secure_allocator<U>& a) throw() : base(a) {}
     ~secure_allocator() throw() {}
     template<typename _Other> struct rebind
     { typedef secure_allocator<_Other> other; };