population_sacha/class_RLE_Image.cpp
// Swapping two instances of a class to be able to provide an assignment constructor

Swapping two instances of a class to be able to provide an assignment constructor
Swapping two instances of a class to be able to provide an assignment constructor
void RLE_Image::swap(RLE_Image& image1, RLE_Image& image2)
{
	std::swap(image1.runs_number, image2.runs_number);
	std::swap(image1.runs_pointer_array_size, image2.runs_pointer_array_size);
	std::swap(image1.size_i, image2.size_i);
	std::swap(image1.size_j, image2.size_j);
	std::swap(image1.image_runs, image2.image_runs);
}
void RLE_Image :: swap ( RLE_Image & image1 , RLE_Image & image2 ) { std :: swap ( image1 . runs_number , image2 . runs_number ) ; std :: swap ( image1 . runs_pointer_array_size , image2 . runs_pointer_array_size ) ; std :: swap ( image1 . size_i , image2 . size_i ) ; std :: swap ( image1 . size_j , image2 . size_j ) ; std :: swap ( image1 . image_runs , image2 . image_runs ) ; }
Swapping two instances of a class to be able to provide an assignment constructor
Swapping two instances of a class to be able to provide an assignment constructor