Fix the '-Wcatch-value' warning under gcc 7.3.0
tiv.cpp:464:45: warning: catching polymorphic type ‘struct cimg_library::CImgIOException’ by value [-Wcatch-value=]
This commit is contained in:
		 CHEN Feng
					CHEN Feng
				
			
				
					committed by
					
						 Stefan Haustein
						Stefan Haustein
					
				
			
			
				
	
			
			
			 Stefan Haustein
						Stefan Haustein
					
				
			
						parent
						
							949f72ffa9
						
					
				
				
					commit
					287fde3341
				
			| @@ -459,7 +459,7 @@ int main(int argc, char* argv[]) { | |||||||
| 	  image.resize((int) (image.width() * scale), (int) (image.height() * scale), -100, -100, 5); | 	  image.resize((int) (image.width() * scale), (int) (image.height() * scale), -100, -100, 5); | ||||||
| 	} | 	} | ||||||
| 	emit_image(image, flags); | 	emit_image(image, flags); | ||||||
|       } catch(cimg_library::CImgIOException e) { |       } catch(cimg_library::CImgIOException & e) { | ||||||
| 	error = 1; | 	error = 1; | ||||||
| 	std::cerr << "File format is not recognized for '" << file_names[i] << "'" << std::endl; | 	std::cerr << "File format is not recognized for '" << file_names[i] << "'" << std::endl; | ||||||
|       } |       } | ||||||
| @@ -489,7 +489,7 @@ int main(int argc, char* argv[]) { | |||||||
| 	  unsigned int sl = count * (cw + 2); | 	  unsigned int sl = count * (cw + 2); | ||||||
| 	  sb.resize(sl - 2, ' '); | 	  sb.resize(sl - 2, ' '); | ||||||
| 	  sb += "  "; | 	  sb += "  "; | ||||||
| 	} catch (std::exception e) { | 	} catch (std::exception & e) { | ||||||
| 	  // Probably no image; ignore. | 	  // Probably no image; ignore. | ||||||
| 	} | 	} | ||||||
|       } |       } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user