{
// use a tried node
double fChanceFactor = 1.0;
- while(1)
+ for ( ; ; )
{
int nKBucket = GetRandInt(vvTried.size());
std::vector<int> &vTried = vvTried[nKBucket];
} else {
// use a new node
double fChanceFactor = 1.0;
- while(1)
+ for ( ; ; )
{
int nUBucket = GetRandInt(vvNew.size());
std::set<int> &vNew = vvNew[nUBucket];
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();
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 )
{
}
if (semOutbound)
for (int i=0; i<MAX_OUTBOUND_CONNECTIONS; i++)
semOutbound->post();
- do
+ for ( ; ; )
{
int nThreadsRunning = 0;
for (int n = 0; n < THREAD_MAX; n++)
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");
intro.setDataDirectory(dataDir);
intro.setWindowIcon(QIcon(":icons/bitcoin"));
- while(true)
+ for ( ; ; )
{
if(!intro.exec())
{
{
nWalletUnlockTime = nMyWakeTime;
- do
+ for ( ; ; )
{
if (nWalletUnlockTime==0)
break;
Sleep(nToSleep);
ENTER_CRITICAL_SECTION(cs_nWalletUnlockTime);
- } while(1);
+ };
if (nWalletUnlockTime)
{
inline unsigned int GetSizeOfVarInt(I n)
{
int nRet = 0;
- while(true) {
+ for ( ; ; ) {
nRet++;
if (n <= 0x7F)
break;
{
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;
I ReadVarInt(Stream& is)
{
I n = 0;
- while(true) {
+ for ( ; ; ) {
unsigned char chData;
READDATA(is, chData);
n = (n << 7) | (chData & 0x7F);