Skip to content

Commit 2f8cd6b

Browse files
ssexaKingKili
authored andcommitted
Fix compiler warning C4244 on MSVC.
1 parent 67e2a4d commit 2f8cd6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpr/util.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ void secureStringClear(std::string& s) {
231231

232232
bool isTrue(const std::string& s) {
233233
std::string temp_string{s};
234-
std::transform(temp_string.begin(), temp_string.end(), temp_string.begin(), [](unsigned char c) { return std::tolower(c); });
234+
std::transform(temp_string.begin(), temp_string.end(), temp_string.begin(), [](unsigned char c) { return static_cast<unsigned char>(std::tolower(c)); });
235235
return temp_string == "true";
236236
}
237237

0 commit comments

Comments
 (0)