fix compile error on windows(visual studio 2022) (#1386)

This commit is contained in:
ggyy
2021-11-24 22:12:23 +08:00
committed by GitHub
parent e8b870c7ba
commit ce641a4c09
+1 -1
View File
@@ -314,7 +314,7 @@ public:
} else if (fallback.length()) {
unsigned int had = (unsigned int) fallback.length();
size_t maxCopyDistance = std::min(MAX_FALLBACK_SIZE - fallback.length(), (size_t) length);
size_t maxCopyDistance = std::min<size_t>(MAX_FALLBACK_SIZE - fallback.length(), (size_t) length);
/* We don't want fallback to be short string optimized, since we want to move it */
fallback.reserve(fallback.length() + maxCopyDistance + std::max<unsigned int>(MINIMUM_HTTP_POST_PADDING, sizeof(std::string)));