diff --git a/src/beast/beast/http/rfc2616.h b/src/beast/beast/http/rfc2616.h index fc697b805..e446542c7 100644 --- a/src/beast/beast/http/rfc2616.h +++ b/src/beast/beast/http/rfc2616.h @@ -20,11 +20,12 @@ #ifndef BEAST_HTTP_RFC2616_H_INCLUDED #define BEAST_HTTP_RFC2616_H_INCLUDED +#include #include #include +#include #include #include -#include namespace beast { @@ -130,8 +131,8 @@ trim (String const& s) { using std::begin; using std::end; - auto first (begin(s)); - auto last (end(s)); + auto first = begin(s); + auto last = end(s); std::tie (first, last) = trim (first, last); return { first, last }; } diff --git a/src/beast/beast/module/core/text/LexicalCast.h b/src/beast/beast/module/core/text/LexicalCast.h index 52b122001..f0d55ec89 100644 --- a/src/beast/beast/module/core/text/LexicalCast.h +++ b/src/beast/beast/module/core/text/LexicalCast.h @@ -21,15 +21,16 @@ #define BEAST_LEXICALCAST_H_INCLUDED #include -#include // #include #include #include +#include +#include #include #include -#include +#include // #include -#include +#include namespace beast { @@ -169,14 +170,14 @@ struct LexicalCast std::enable_if_t ::value, bool> operator () (Integral& out, std::string const& in) const { - return parseUnsigned (out, std::begin(in), std::end(in)); + return parseUnsigned (out, in.begin(), in.end()); } template std::enable_if_t ::value, bool> operator () (Integral& out, std::string const& in) const { - return parseSigned (out, std::begin(in), std::end(in)); + return parseSigned (out, in.begin(), in.end()); } bool diff --git a/src/beast/beast/utility/ci_char_traits.h b/src/beast/beast/utility/ci_char_traits.h index 406302369..056e08c9b 100644 --- a/src/beast/beast/utility/ci_char_traits.h +++ b/src/beast/beast/utility/ci_char_traits.h @@ -23,6 +23,7 @@ #include // #include // #include +#include #include #include @@ -37,9 +38,11 @@ struct ci_less bool operator() (String const& lhs, String const& rhs) const { - typedef typename String::value_type char_type; - return std::lexicographical_compare (std::begin(lhs), std::end(lhs), - std::begin(rhs), std::end(rhs), + using std::begin; + using std::end; + using char_type = typename String::value_type; + return std::lexicographical_compare ( + begin(lhs), end(lhs), begin(rhs), end(rhs), [] (char_type lhs, char_type rhs) { return std::tolower(lhs) < std::tolower(rhs); @@ -54,7 +57,9 @@ std::enable_if_t::value && std::is_same::value, bool> ci_equal(Lhs const& lhs, Rhs const& rhs) { - return std::equal (lhs.begin(), lhs.end(), rhs.begin(), rhs.end(), + using std::begin; + using std::end; + return std::equal (begin(lhs), end(lhs), begin(rhs), end(rhs), [] (char lhs, char rhs) { return std::tolower(lhs) == std::tolower(rhs); diff --git a/src/ripple/crypto/Base58Data.h b/src/ripple/crypto/Base58Data.h index 803d4de40..0f9209eb0 100644 --- a/src/ripple/crypto/Base58Data.h +++ b/src/ripple/crypto/Base58Data.h @@ -66,10 +66,8 @@ protected: void SetData (int version, base_uint const& from) { nVersion = version; - vchData.resize (from.size ()); - - std::copy (std::begin (from), std::end(from), std::begin (vchData)); + std::copy (from.begin(), from.end(), vchData.begin()); } public: diff --git a/src/ripple/crypto/impl/Base58Data.cpp b/src/ripple/crypto/impl/Base58Data.cpp index 0311c7719..4b6800de0 100644 --- a/src/ripple/crypto/impl/Base58Data.cpp +++ b/src/ripple/crypto/impl/Base58Data.cpp @@ -18,6 +18,7 @@ //============================================================================== #include +#include namespace ripple { @@ -42,7 +43,7 @@ CBase58Data::CBase58Data () CBase58Data::~CBase58Data () { // Ensures that any potentially sensitive data is cleared from memory - std::fill (std::begin (vchData), std::end(vchData), 0); + std::fill (vchData.begin(), vchData.end(), 0); } bool CBase58Data::SetString (