Skip to content

Commit

Permalink
remove unused var from deleted stuff
Browse files Browse the repository at this point in the history
Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb committed Mar 30, 2022
1 parent 8f9b396 commit a039474
Show file tree
Hide file tree
Showing 30 changed files with 113 additions and 130 deletions.
2 changes: 1 addition & 1 deletion app/actions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class TaskFactory {
static TaskFactory& instance();

//! Prevent copy construction: not implemented.
TaskFactory(const TaskFactory& rhs) = delete;
TaskFactory(const TaskFactory&) = delete;

//! Destructor
void cleanup();
Expand Down
2 changes: 1 addition & 1 deletion app/exiv2app.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class Params : public Util::Getopt {
static Params& instance();

//! Prevent copy-construction: not implemented.
Params(const Params& rhs) = delete;
Params(const Params&) = delete;

//! Enumerates print modes
enum PrintMode {
Expand Down
74 changes: 37 additions & 37 deletions include/exiv2/basicio.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class EXIV2API BasicIo {
@return Number of bytes written to IO source successfully;<BR>
0 if failure;
*/
virtual size_t write(BasicIo &src) = 0;
virtual size_t write(BasicIo& src) = 0;
/*!
@brief Write one byte to the IO source. Current IO position is
advanced by one byte.
Expand Down Expand Up @@ -153,7 +153,7 @@ class EXIV2API BasicIo {
invalidated by the method.
@throw Error In case of failure
*/
virtual void transfer(BasicIo &src) = 0;
virtual void transfer(BasicIo& src) = 0;
/*!
@brief Move the current IO position.
@param offset Number of bytes to move the position relative
Expand Down Expand Up @@ -219,7 +219,7 @@ class EXIV2API BasicIo {
comprehensive error messages where only a BasicIo instance is
available.
*/
[[nodiscard]] virtual const std::string &path() const noexcept = 0;
[[nodiscard]] virtual const std::string& path() const noexcept = 0;

/*!
@brief Mark all the bNone blocks to bKnow. This avoids allocating memory
Expand Down Expand Up @@ -249,7 +249,7 @@ class EXIV2API IoCloser {
//! @name Creators
//@{
//! Constructor, takes a BasicIo reference
explicit IoCloser(BasicIo &bio) : bio_(bio) {
explicit IoCloser(BasicIo& bio) : bio_(bio) {
}
//! Destructor, closes the BasicIo reference
virtual ~IoCloser() {
Expand All @@ -268,13 +268,13 @@ class EXIV2API IoCloser {

// DATA
//! The BasicIo reference
BasicIo &bio_;
BasicIo& bio_;

// Not implemented
//! Copy constructor
IoCloser(const IoCloser &) = delete;
IoCloser(const IoCloser&) = delete;
//! Assignment operator
IoCloser &operator=(const IoCloser &) = delete;
IoCloser& operator=(const IoCloser&) = delete;
}; // class IoCloser

/*!
Expand All @@ -291,7 +291,7 @@ class EXIV2API FileIo : public BasicIo {
therefore never fails.
@param path The full path of a file
*/
explicit FileIo(const std::string &path);
explicit FileIo(const std::string& path);

//! Destructor. Flushes and closes an open file.
~FileIo() override;
Expand All @@ -312,7 +312,7 @@ class EXIV2API FileIo : public BasicIo {
@return 0 if successful;<BR>
Nonzero if failure.
*/
int open(const std::string &mode);
int open(const std::string& mode);
/*!
@brief Open the file using the default access mode of "rb".
This method can also be used to "reopen" a file which will flush
Expand Down Expand Up @@ -347,7 +347,7 @@ class EXIV2API FileIo : public BasicIo {
@return Number of bytes written to the file successfully;<BR>
0 if failure;
*/
size_t write(BasicIo &src) override;
size_t write(BasicIo& src) override;
/*!
@brief Write one byte to the file. The file position is
advanced by one byte.
Expand Down Expand Up @@ -405,7 +405,7 @@ class EXIV2API FileIo : public BasicIo {
invalidated by the method.
@throw Error In case of failure
*/
void transfer(BasicIo &src) override;
void transfer(BasicIo& src) override;

int seek(int64_t offset, Position pos) override;

Expand All @@ -432,7 +432,7 @@ class EXIV2API FileIo : public BasicIo {
/*!
@brief close the file source and set a new path.
*/
virtual void setPath(const std::string &path);
virtual void setPath(const std::string& path);

//@}
//! @name Accessors
Expand All @@ -457,7 +457,7 @@ class EXIV2API FileIo : public BasicIo {
//! Returns true if the file position has reached the end, otherwise false.
[[nodiscard]] bool eof() const override;
//! Returns the path of the file
[[nodiscard]] const std::string &path() const noexcept override;
[[nodiscard]] const std::string& path() const noexcept override;

/*!
@brief Mark all the bNone blocks to bKnow. This avoids allocating memory
Expand All @@ -471,9 +471,9 @@ class EXIV2API FileIo : public BasicIo {

// NOT IMPLEMENTED
//! Copy constructor
FileIo(FileIo &rhs) = delete;
FileIo(const FileIo&) = delete;
//! Assignment operator
FileIo &operator=(const FileIo &rhs) = delete;
FileIo& operator=(const FileIo&) = delete;

private:
// Pimpl idiom
Expand Down Expand Up @@ -547,7 +547,7 @@ class EXIV2API MemIo : public BasicIo {
@return Number of bytes written to the memory block successfully;<BR>
0 if failure;
*/
size_t write(BasicIo &src) override;
size_t write(BasicIo& src) override;
/*!
@brief Write one byte to the memory block. The IO position is
advanced by one byte.
Expand Down Expand Up @@ -602,7 +602,7 @@ class EXIV2API MemIo : public BasicIo {
invalidated by the method.
@throw Error In case of failure
*/
void transfer(BasicIo &src) override;
void transfer(BasicIo& src) override;

int seek(int64_t offset, Position pos) override;

Expand Down Expand Up @@ -638,7 +638,7 @@ class EXIV2API MemIo : public BasicIo {
//! Returns true if the IO position has reached the end, otherwise false.
[[nodiscard]] bool eof() const override;
//! Returns a dummy path, indicating that memory access is used
[[nodiscard]] const std::string &path() const noexcept override;
[[nodiscard]] const std::string& path() const noexcept override;

/*!
@brief Mark all the bNone blocks to bKnow. This avoids allocating memory
Expand All @@ -653,9 +653,9 @@ class EXIV2API MemIo : public BasicIo {

// NOT IMPLEMENTED
//! Copy constructor
MemIo(MemIo &rhs) = delete;
MemIo(const MemIo&) = delete;
//! Assignment operator
MemIo &operator=(const MemIo &rhs) = delete;
MemIo& operator=(const MemIo&) = delete;

private:
// Pimpl idiom
Expand All @@ -673,7 +673,7 @@ class EXIV2API XPathIo : public MemIo {
//! @name Creators
//@{
//! Default constructor
XPathIo(const std::string &path);
XPathIo(const std::string& path);
//@}
private:
/*!
Expand All @@ -686,7 +686,7 @@ class EXIV2API XPathIo : public MemIo {
@param path The data uri.
@throw Error if no base64 data in path.
*/
void ReadDataUri(const std::string &path);
void ReadDataUri(const std::string& path);
}; // class XPathIo
#else
class EXIV2API XPathIo : public FileIo {
Expand All @@ -705,7 +705,7 @@ class EXIV2API XPathIo : public FileIo {
//! @name Creators
//@{
//! Default constructor that reads data from stdin/data uri path and writes them to the temp file.
explicit XPathIo(const std::string &orgPath);
explicit XPathIo(const std::string& orgPath);

//! Destructor. Releases all managed memory and removes the temp file.
~XPathIo() override;
Expand All @@ -717,7 +717,7 @@ class EXIV2API XPathIo : public FileIo {
@brief Change the name of the temp file and make it untemporary before
calling the method of superclass FileIo::transfer.
*/
void transfer(BasicIo &src) override;
void transfer(BasicIo& src) override;

//@}

Expand All @@ -729,7 +729,7 @@ class EXIV2API XPathIo : public FileIo {
@return the name of the new file.
@throw Error if it fails.
*/
static std::string writeDataToFile(const std::string &orgPath);
static std::string writeDataToFile(const std::string& orgPath);
//@}

private:
Expand Down Expand Up @@ -789,7 +789,7 @@ class EXIV2API RemoteIo : public BasicIo {
@note The write access is only supported by http, https, ssh.
*/
size_t write(BasicIo &src) override;
size_t write(BasicIo& src) override;

/*!
@brief Not support
Expand Down Expand Up @@ -847,7 +847,7 @@ class EXIV2API RemoteIo : public BasicIo {
@note The write access is only supported by http, https, ssh.
*/
void transfer(BasicIo &src) override;
void transfer(BasicIo& src) override;

int seek(int64_t offset, Position pos) override;

Expand Down Expand Up @@ -882,7 +882,7 @@ class EXIV2API RemoteIo : public BasicIo {
//! Returns true if the IO position has reached the end, otherwise false.
[[nodiscard]] bool eof() const override;
//! Returns the URL of the file.
[[nodiscard]] const std::string &path() const noexcept override;
[[nodiscard]] const std::string& path() const noexcept override;

/*!
@brief Mark all the bNone blocks to bKnow. This avoids allocating memory
Expand Down Expand Up @@ -918,13 +918,13 @@ class EXIV2API HttpIo : public RemoteIo {
divided into the memory blocks. These blocks are populated
on demand from the server, so it avoids copying the complete file.
*/
explicit HttpIo(const std::string &url, size_t blockSize = 1024);
explicit HttpIo(const std::string& url, size_t blockSize = 1024);

// NOT IMPLEMENTED
//! Copy constructor
HttpIo(HttpIo &rhs) = delete;
HttpIo(const HttpIo&) = delete;
//! Assignment operator
HttpIo &operator=(const HttpIo &rhs) = delete;
HttpIo& operator=(const HttpIo&) = delete;

private:
// Pimpl idiom
Expand All @@ -949,7 +949,7 @@ class EXIV2API CurlIo : public RemoteIo {
on demand from the server, so it avoids copying the complete file.
@throw Error if it is unable to init curl pointer.
*/
explicit CurlIo(const std::string &url, size_t blockSize = 0);
explicit CurlIo(const std::string& url, size_t blockSize = 0);

/*!
@brief Write access is only available for some protocols. This method
Expand All @@ -962,13 +962,13 @@ class EXIV2API CurlIo : public RemoteIo {
will call RemoteIo::write(BasicIo& src) if the write access is available
for the protocol. Otherwise, it throws the Error.
*/
size_t write(BasicIo &src) override;
size_t write(BasicIo& src) override;

// NOT IMPLEMENTED
//! Copy constructor
CurlIo(CurlIo &rhs) = delete;
CurlIo(const CurlIo&) = delete;
//! Assignment operator
CurlIo &operator=(const CurlIo &rhs) = delete;
CurlIo& operator=(const CurlIo&) = delete;

protected:
// Pimpl idiom
Expand All @@ -984,13 +984,13 @@ class EXIV2API CurlIo : public RemoteIo {
@return Buffer containing the file.
@throw Error In case of failure.
*/
EXIV2API DataBuf readFile(const std::string &path);
EXIV2API DataBuf readFile(const std::string& path);
/*!
@brief Write DataBuf \em buf to file \em path.
@return Return the number of bytes written.
@throw Error In case of failure.
*/
EXIV2API size_t writeFile(const DataBuf &buf, const std::string &path);
EXIV2API size_t writeFile(const DataBuf& buf, const std::string& path);
#ifdef EXV_USE_CURL
/*!
@brief The callback function is called by libcurl to write the data
Expand Down
4 changes: 2 additions & 2 deletions include/exiv2/bmpimage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class EXIV2API BmpImage : public Image {
//! @name NOT Implemented
//@{
//! Copy constructor
BmpImage(const BmpImage& rhs) = delete;
BmpImage(const BmpImage&) = delete;
//! Assignment operator
BmpImage& operator=(const BmpImage& rhs) = delete;
BmpImage& operator=(const BmpImage&) = delete;
//@}

//! @name Creators
Expand Down
4 changes: 2 additions & 2 deletions include/exiv2/cr2image.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ class EXIV2API Cr2Image : public Image {
//! @name NOT implemented
//@{
//! Copy constructor
Cr2Image(const Cr2Image& rhs) = delete;
Cr2Image(const Cr2Image&) = delete;
//! Assignment operator
Cr2Image& operator=(const Cr2Image& rhs) = delete;
Cr2Image& operator=(const Cr2Image&) = delete;
//@}

}; // class Cr2Image
Expand Down
4 changes: 2 additions & 2 deletions include/exiv2/crwimage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ class EXIV2API CrwImage : public Image {
//! @name NOT Implemented
//@{
//! Copy constructor
CrwImage(const CrwImage& rhs) = delete;
CrwImage(const CrwImage&) = delete;
//! Assignment operator
CrwImage& operator=(const CrwImage& rhs) = delete;
CrwImage& operator=(const CrwImage&) = delete;
//@}

}; // class CrwImage
Expand Down
8 changes: 3 additions & 5 deletions include/exiv2/datasets.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,10 @@ class EXIV2API IptcDataSets {
static constexpr uint16_t Preview = 202;
//@}

//! Prevent construction: not implemented.
IptcDataSets() = delete;
//! Prevent copy-construction: not implemented.
IptcDataSets(const IptcDataSets& rhs) = delete;
IptcDataSets(const IptcDataSets&) = delete;
//! Prevent assignment: not implemented.
IptcDataSets& operator=(const IptcDataSets& rhs) = delete;
IptcDataSets& operator=(const IptcDataSets&) = delete;

/*!
@brief Return the name of the dataset.
Expand Down Expand Up @@ -265,7 +263,7 @@ class EXIV2API IptcKey : public Key {
IptcKey(uint16_t tag, uint16_t record);
//! Copy constructor
IptcKey(const IptcKey& rhs);
IptcKey& operator=(const IptcKey& rhs) = delete;
IptcKey& operator=(const IptcKey&) = delete;
//! Destructor
~IptcKey() override = default;
//@}
Expand Down
4 changes: 2 additions & 2 deletions include/exiv2/epsimage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ class EXIV2API EpsImage : public Image {
//! @name NOT Implemented
//@{
//! Copy constructor
EpsImage(const EpsImage& rhs) = delete;
EpsImage(const EpsImage&) = delete;
//! Assignment operator
EpsImage& operator=(const EpsImage& rhs) = delete;
EpsImage& operator=(const EpsImage&) = delete;
//@}

}; // class EpsImage
Expand Down
4 changes: 2 additions & 2 deletions include/exiv2/gifimage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class EXIV2API GifImage : public Image {
//! @name NOT Implemented
//@{
//! Copy constructor
GifImage(const GifImage& rhs) = delete;
GifImage(const GifImage&) = delete;
//! Assignment operator
GifImage& operator=(const GifImage& rhs) = delete;
GifImage& operator=(const GifImage&) = delete;
//@}

//! @name Creators
Expand Down
Loading

0 comments on commit a039474

Please sign in to comment.