Skip to content

Commit

Permalink
Use =delete for private unimplemented constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
jackburton79 committed Oct 5, 2024
1 parent 7a89fc5 commit ad87fc1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
17 changes: 0 additions & 17 deletions ImageFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,6 @@ ImageFilter::ImageFilter(BRect frame, color_space colorSpace)
}


// private non-working
ImageFilter::ImageFilter(const ImageFilter& other)
:
fBitmap(NULL),
fView(NULL)
{
}


// private non-working
ImageFilter&
ImageFilter::operator=(const ImageFilter& other)
{
return *this;
}


ImageFilter::~ImageFilter()
{
delete fBitmap;
Expand Down
4 changes: 2 additions & 2 deletions ImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class ImageFilter {
BBitmap* fBitmap;
BView* fView;

ImageFilter& operator=(const ImageFilter& other);
ImageFilter(const ImageFilter& other);
ImageFilter& operator=(const ImageFilter& other) = delete ;
ImageFilter(const ImageFilter& other) = delete ;
};


Expand Down

0 comments on commit ad87fc1

Please sign in to comment.