Fix annoying compiler warning.
authorRajkiran Natarajan <saskatchewancatch@gmail.com>
Thu, 27 Feb 2020 06:59:02 +0000 (22:59 -0800)
committerRajkiran Natarajan <saskatchewancatch@gmail.com>
Thu, 27 Feb 2020 06:59:02 +0000 (22:59 -0800)
modules/gapi/samples/privacy_masking_camera.cpp

index 7cb6e22..d16a1b9 100644 (file)
@@ -35,7 +35,7 @@ std::string weights_path(const std::string &model_path) {
 
     auto ext = model_path.substr(sz - EXT_LEN);
 
-    std::transform(ext.begin(), ext.end(), ext.begin(), [](unsigned char c){ return std::tolower(c); });
+    std::transform(ext.begin(), ext.end(), ext.begin(), [](unsigned char c){ return static_cast<unsigned char>(std::tolower(c)); });
     CV_Assert(ext == ".xml");
 
     return model_path.substr(0u, sz - EXT_LEN) + ".bin";