build: fix build with GCC 4.8

pull/2416/head
Alexander Alekhin 5 years ago
parent e8916dae98
commit d8c6d067b3
  1. 11
      modules/dnn_superres/samples/dnn_superres_multioutput.cpp

@ -31,20 +31,25 @@ int main(int argc, char *argv[])
std::string path = string(argv[4]); std::string path = string(argv[4]);
//Parse the scaling factors //Parse the scaling factors
std::stringstream ss(scales_str);
std::vector<int> scales; std::vector<int> scales;
std::string token;
char delim = ','; char delim = ',';
{
std::stringstream ss(scales_str);
std::string token;
while (std::getline(ss, token, delim)) { while (std::getline(ss, token, delim)) {
scales.push_back(atoi(token.c_str())); scales.push_back(atoi(token.c_str()));
} }
}
//Parse the output node names //Parse the output node names
ss = std::stringstream(output_names_str);
std::vector<String> node_names; std::vector<String> node_names;
{
std::stringstream ss(output_names_str);
std::string token;
while (std::getline(ss, token, delim)) { while (std::getline(ss, token, delim)) {
node_names.push_back(token); node_names.push_back(token);
} }
}
// Load the image // Load the image
Mat img = cv::imread(img_path); Mat img = cv::imread(img_path);

Loading…
Cancel
Save