+ make operator=() non-throw

+ use std::swap()
This commit is contained in:
artemp 2013-03-14 09:34:52 +00:00
parent 31bcb8507b
commit 8d3061076d
2 changed files with 7 additions and 7 deletions

View file

@ -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_);
}

View file

@ -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_;