From 8d3061076d9f29a4b4cbb1d48aaf6459d90ed929 Mon Sep 17 00:00:00 2001 From: artemp Date: Thu, 14 Mar 2013 09:34:52 +0000 Subject: [PATCH] + make operator=() non-throw + use std::swap() --- plugins/input/raster/raster_info.cpp | 12 ++++++------ plugins/input/raster/raster_info.hpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/input/raster/raster_info.cpp b/plugins/input/raster/raster_info.cpp index 941dffd06..10bd79775 100644 --- a/plugins/input/raster/raster_info.cpp +++ b/plugins/input/raster/raster_info.cpp @@ -44,13 +44,13 @@ raster_info::raster_info(const raster_info& rhs) { } -void raster_info::swap(raster_info& other) throw() +void raster_info::swap(raster_info& other) //throw() { - file_ = other.file_; - format_ = other.format_; - extent_ = other.extent_; - width_ = other.width_; - height_ = other.height_; + std::swap(file_,other.file_); + std::swap(format_,other.format_); + std::swap(extent_ ,other.extent_); + std::swap(width_,other.width_); + std::swap(height_, other.height_); } diff --git a/plugins/input/raster/raster_info.hpp b/plugins/input/raster/raster_info.hpp index e3756d544..4de948528 100644 --- a/plugins/input/raster/raster_info.hpp +++ b/plugins/input/raster/raster_info.hpp @@ -47,7 +47,7 @@ public: inline unsigned height() const { return height_;} private: - void swap(raster_info& other) throw(); + void swap(raster_info& other); std::string file_; std::string format_;