Skip to content

Commit bdfd1e7

Browse files
committed
Merge pull request #2416 from alalek:fix_build_gcc48
2 parents 12d1f6c + d8c6d06 commit bdfd1e7

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

modules/dnn_superres/samples/dnn_superres_multioutput.cpp

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,24 @@ int main(int argc, char *argv[])
3131
std::string path = string(argv[4]);
3232

3333
//Parse the scaling factors
34-
std::stringstream ss(scales_str);
3534
std::vector<int> scales;
36-
std::string token;
3735
char delim = ',';
38-
while (std::getline(ss, token, delim)) {
39-
scales.push_back(atoi(token.c_str()));
36+
{
37+
std::stringstream ss(scales_str);
38+
std::string token;
39+
while (std::getline(ss, token, delim)) {
40+
scales.push_back(atoi(token.c_str()));
41+
}
4042
}
4143

4244
//Parse the output node names
43-
ss = std::stringstream(output_names_str);
4445
std::vector<String> node_names;
45-
while (std::getline(ss, token, delim)) {
46-
node_names.push_back(token);
46+
{
47+
std::stringstream ss(output_names_str);
48+
std::string token;
49+
while (std::getline(ss, token, delim)) {
50+
node_names.push_back(token);
51+
}
4752
}
4853

4954
// Load the image

0 commit comments

Comments
 (0)