#include "sync.h"
#include "version.h"
#include "interface.h"
+
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/case_conv.hpp> // for to_lower()
#include <boost/algorithm/string/predicate.hpp> // for startswith() and endswith()
#include <boost/program_options/parsers.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
-
#include <boost/date_time/posix_time/posix_time.hpp>
-#include <boost/foreach.hpp>
#include <boost/thread.hpp>
#include <openssl/crypto.h>
#include <openssl/rand.h>
bool IsHex(const string& str)
{
- BOOST_FOREACH(unsigned char c, str)
+ for (unsigned char c : str)
{
if (phexdigit[c] < 0)
return false;
}
// New 0.6 features:
- BOOST_FOREACH(const PAIRTYPE(string,string)& entry, mapArgs)
+ for (const auto& entry : mapArgs)
{
string name = entry.first;
std::string EncodeDumpString(const std::string &str) {
std::stringstream ret;
- BOOST_FOREACH(unsigned char c, str) {
+ for (unsigned char c : str) {
if (c <= 32 || c >= 128 || c == '%') {
ret << '%' << HexStr(&c, &c + 1);
} else {
bool fMatch = false;
// If nobody has a time different than ours but within 5 minutes of ours, give a warning
- BOOST_FOREACH(int64_t nOffset, vSorted)
+ for (int64_t nOffset : vSorted)
if (nOffset != 0 && abs64(nOffset) < 5 * 60)
fMatch = true;
}
}
if (fDebug) {
- BOOST_FOREACH(int64_t n, vSorted)
+ for (int64_t n : vSorted)
printf("%+" PRId64 " ", n);
printf("| ");
}