From: CryptoManiac Date: Mon, 21 Mar 2016 09:17:51 +0000 (+0300) Subject: Merge pull request #292 from svost/patch X-Git-Tag: nvc-v0.5.7~15^2 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=bc40f3e6f3697034af270e65f57f03c8635a2c6d;hp=817b7171e1db8a4a1a1bdc4651806098a17bf912 Merge pull request #292 from svost/patch Minor fix --- diff --git a/src/addrman.cpp b/src/addrman.cpp index ed17c39..f24e7e7 100644 --- a/src/addrman.cpp +++ b/src/addrman.cpp @@ -398,7 +398,7 @@ CAddress CAddrMan::Select_(int nUnkBias) { // use a tried node double fChanceFactor = 1.0; - while(1) + for ( ; ; ) { int nKBucket = GetRandInt(vvTried.size()); std::vector &vTried = vvTried[nKBucket]; @@ -413,7 +413,7 @@ CAddress CAddrMan::Select_(int nUnkBias) } else { // use a new node double fChanceFactor = 1.0; - while(1) + for ( ; ; ) { int nUBucket = GetRandInt(vvNew.size()); std::set &vNew = vvNew[nUBucket]; diff --git a/src/json/json_spirit_value.h b/src/json/json_spirit_value.h index 3b864f6..5e1ae64 100644 --- a/src/json/json_spirit_value.h +++ b/src/json/json_spirit_value.h @@ -64,8 +64,8 @@ namespace json_spirit const Array& get_array() const; bool get_bool() const; int get_int() const; - boost::int64_t get_int64() const; - boost::uint64_t get_uint64() const; + int64_t get_int64() const; + uint64_t get_uint64() const; double get_real() const; Object& get_obj(); @@ -273,7 +273,7 @@ namespace json_spirit template< class Config > Value_impl< Config >::Value_impl( uint64_t value ) : type_( int_type ) - , v_( static_cast< boost::int64_t >( value ) ) + , v_( static_cast< int64_t >( value ) ) , is_uint64_( true ) { } diff --git a/src/net.cpp b/src/net.cpp index 5a853da..9d3b998 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1760,7 +1760,7 @@ bool StopNode() if (semOutbound) for (int i=0; ipost(); - do + for ( ; ; ) { int nThreadsRunning = 0; for (int n = 0; n < THREAD_MAX; n++) @@ -1770,7 +1770,7 @@ bool StopNode() if (GetTime() - nStart > 20) break; Sleep(20); - } while(true); + }; if (vnThreadsRunning[THREAD_SOCKETHANDLER] > 0) printf("ThreadSocketHandler still running\n"); if (vnThreadsRunning[THREAD_OPENCONNECTIONS] > 0) printf("ThreadOpenConnections still running\n"); if (vnThreadsRunning[THREAD_MESSAGEHANDLER] > 0) printf("ThreadMessageHandler still running\n"); diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index fe31dd0..75c1c82 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -169,7 +169,7 @@ void Intro::pickDataDirectory() intro.setDataDirectory(dataDir); intro.setWindowIcon(QIcon(":icons/bitcoin")); - while(true) + for ( ; ; ) { if(!intro.exec()) { diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index 8c36836..aa8f876 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -1511,7 +1511,7 @@ void ThreadCleanWalletPassphrase(void* parg) { nWalletUnlockTime = nMyWakeTime; - do + for ( ; ; ) { if (nWalletUnlockTime==0) break; @@ -1523,7 +1523,7 @@ void ThreadCleanWalletPassphrase(void* parg) Sleep(nToSleep); ENTER_CRITICAL_SECTION(cs_nWalletUnlockTime); - } while(1); + }; if (nWalletUnlockTime) { diff --git a/src/serialize.h b/src/serialize.h index 8305dd0..bdcd830 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -270,7 +270,7 @@ template inline unsigned int GetSizeOfVarInt(I n) { int nRet = 0; - while(true) { + for ( ; ; ) { nRet++; if (n <= 0x7F) break; @@ -284,7 +284,7 @@ void WriteVarInt(Stream& os, I n) { unsigned char tmp[(sizeof(n)*8+6)/7]; int len=0; - while(true) { + for ( ; ; ) { tmp[len] = (n & 0x7F) | (len ? 0x80 : 0x00); if (n <= 0x7F) break; @@ -300,7 +300,7 @@ template I ReadVarInt(Stream& is) { I n = 0; - while(true) { + for ( ; ; ) { unsigned char chData; READDATA(is, chData); n = (n << 7) | (chData & 0x7F);