From 21c08b636c6c0af31e784a1ab0158f76c122a212 Mon Sep 17 00:00:00 2001 From: Arun M Date: Wed, 2 May 2018 23:05:22 +0530 Subject: [PATCH] Compilation issue in VS2017 #12 --- include/jwt/impl/algorithm.ipp | 2 +- include/jwt/impl/string_view.ipp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/jwt/impl/algorithm.ipp b/include/jwt/impl/algorithm.ipp index cc6fd75..c9fe51a 100644 --- a/include/jwt/impl/algorithm.ipp +++ b/include/jwt/impl/algorithm.ipp @@ -248,7 +248,7 @@ std::string PEMSign::evp_digest( return {}; } - unsigned long len = 0; + size_t len = 0; if (EVP_DigestSignFinal(mdctx_ptr.get(), nullptr, &len) != 1) { ec = AlgorithmErrc::SigningErr; diff --git a/include/jwt/impl/string_view.ipp b/include/jwt/impl/string_view.ipp index 34a7e11..9d40e7a 100644 --- a/include/jwt/impl/string_view.ipp +++ b/include/jwt/impl/string_view.ipp @@ -154,7 +154,7 @@ auto basic_string_view::find_first_not_of( for (size_type i = pos; i < len_; ++i) { auto p = traits_type::find(str, n, data_[i]); - if (not p) return i; + if (!p) return i; } return npos; @@ -171,7 +171,7 @@ auto basic_string_view::find_last_not_of( do { for (size_type i = 0; i < n; ++i) { - if (not traits_type::eq(data_[pos], str[i])) return pos; + if (!traits_type::eq(data_[pos], str[i])) return pos; } } while (pos-- != 0); @@ -186,7 +186,7 @@ auto basic_string_view::find_first_not_of( assert (pos < len_&& "Position must be within the bounds of the view"); for (size_type i = pos; i < len_; ++i) { - if (not traits_type::eq(data_[i], ch)) return i; + if (!traits_type::eq(data_[i], ch)) return i; } return npos; @@ -200,7 +200,7 @@ auto basic_string_view::find_last_not_of( assert (pos < len_ && "Position must be within the bounds of the view"); do { - if (not traits_type::eq(data_[pos], ch)) return pos; + if (!traits_type::eq(data_[pos], ch)) return pos; } while (pos-- != 0); return npos; @@ -217,7 +217,7 @@ bool operator== (basic_string_view a, using size_type = typename basic_string_view::size_type; for (size_type i = 0; i < a.length(); ++i) { - if (not traits_type::eq(a[i], b[i])) return false; + if (!traits_type::eq(a[i], b[i])) return false; } return true; @@ -227,7 +227,7 @@ template bool operator!= (basic_string_view a, basic_string_view b) noexcept { - return not ( a == b ); + return !( a == b ); } template