Commit fb285d2c authored by Albert Astals Cid's avatar Albert Astals Cid

Enable modernize-use-equals-delete

Not claiming copyright since the change is mechanical
parent 53a4fbbb
......@@ -40,7 +40,7 @@ build_clang_libcpp:
script:
- git clone --branch ${CI_COMMIT_REF_NAME} --depth 1 ${TEST_DATA_URL} test-data || git clone --depth 1 ${UPSTREAM_TEST_DATA_URL} test-data
- mkdir -p build && cd build
- CC=clang CXX=clang++ cmake -G Ninja -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DTESTDATADIR=$PWD/../test-data -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-header-filter=.;-checks=-*,performance-*,,bugprone-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,modernize-deprecated-headers,modernize-make-unique,modernize-make-shared,modernize-use-override,-bugprone-narrowing-conversions,-bugprone-macro-parentheses,-bugprone-suspicious-string-compare,-bugprone-incorrect-roundings,-bugprone-undefined-memory-manipulation;-warnings-as-errors=*" ..
- CC=clang CXX=clang++ cmake -G Ninja -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DTESTDATADIR=$PWD/../test-data -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-header-filter=.;-checks=-*,performance-*,,bugprone-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,modernize-deprecated-headers,modernize-make-unique,modernize-make-shared,modernize-use-override,modernize-use-equals-delete,-bugprone-narrowing-conversions,-bugprone-macro-parentheses,-bugprone-suspicious-string-compare,-bugprone-incorrect-roundings,-bugprone-undefined-memory-manipulation;-warnings-as-errors=*" ..
- ninja
- ctest --output-on-failure
......
......@@ -49,12 +49,12 @@ namespace detail
class POPPLER_CPP_EXPORT noncopyable
{
public:
noncopyable(const noncopyable &) = delete;
const noncopyable& operator=(const noncopyable &) = delete;
protected:
noncopyable();
~noncopyable();
private:
noncopyable(const noncopyable &);
const noncopyable& operator=(const noncopyable &);
};
}
......
......@@ -40,6 +40,9 @@ public:
JpegWriter(Format format = RGB);
~JpegWriter() override;
JpegWriter(const JpegWriter &other) = delete;
JpegWriter& operator=(const JpegWriter &other) = delete;
void setQuality(int quality);
void setProgressive(bool progressive);
void setOptimize(bool optimize);
......@@ -52,9 +55,6 @@ public:
bool supportCMYK() override;
private:
JpegWriter(const JpegWriter &other);
JpegWriter& operator=(const JpegWriter &other);
JpegWriterPrivate *priv;
};
......
......@@ -39,6 +39,9 @@ public:
PNGWriter(Format format = RGB);
~PNGWriter() override;
PNGWriter(const PNGWriter &other) = delete;
PNGWriter& operator=(const PNGWriter &other) = delete;
void setICCProfile(const char *name, unsigned char *data, int size);
void setSRGBProfile();
......@@ -51,9 +54,6 @@ public:
bool close() override;
private:
PNGWriter(const PNGWriter &other);
PNGWriter& operator=(const PNGWriter &other);
PNGWriterPrivate *priv;
};
......
......@@ -38,6 +38,9 @@ public:
TiffWriter(Format format = RGB);
~TiffWriter() override;
TiffWriter(const TiffWriter &other) = delete;
TiffWriter& operator=(const TiffWriter &other) = delete;
void setCompressionString(const char *compressionStringArg);
bool init(FILE *openedFile, int width, int height, int hDPI, int vDPI) override;
......@@ -50,9 +53,6 @@ public:
bool close() override;
private:
TiffWriter(const TiffWriter &other);
TiffWriter& operator=(const TiffWriter &other);
TiffWriterPrivate *priv;
};
......
......@@ -48,14 +48,15 @@ public:
GDirEntry(const char *dirPath, const char *nameA, bool doStat);
~GDirEntry();
GDirEntry(const GDirEntry &other) = delete;
GDirEntry& operator=(const GDirEntry &other) = delete;
const GooString *getName() const { return name; }
const GooString *getFullPath() const { return fullPath; }
bool isDir() const { return dir; }
private:
GDirEntry(const GDirEntry &other);
GDirEntry& operator=(const GDirEntry &other);
GooString *name; // dir/file name
GooString *fullPath;
bool dir; // is it a directory?
......@@ -66,13 +67,14 @@ public:
GDir(const char *name, bool doStatA = true);
~GDir();
GDir(const GDir &other) = delete;
GDir& operator=(const GDir &other) = delete;
GDirEntry *getNextEntry();
void rewind();
private:
GDir(const GDir &other);
GDir& operator=(const GDir &other);
GooString *path; // directory path
bool doStat; // call stat() for each entry?
#if defined(_WIN32)
......
......@@ -43,6 +43,9 @@ public:
X509CertificateInfo();
~X509CertificateInfo();
X509CertificateInfo(const X509CertificateInfo &) = delete;
X509CertificateInfo& operator=(const X509CertificateInfo &) = delete;
struct PublicKeyInfo {
PublicKeyInfo();
......@@ -103,9 +106,6 @@ public:
void setIsSelfSigned(bool);
private:
X509CertificateInfo(const X509CertificateInfo &) = delete;
X509CertificateInfo& operator=(const X509CertificateInfo &) = delete;
EntityInfo issuer_info;
EntityInfo subject_info;
PublicKeyInfo public_key_info;
......
......@@ -28,6 +28,10 @@ public:
JPXStream(Stream *strA);
~JPXStream() override;
JPXStream(const JPXStream &other) = delete;
JPXStream& operator=(const JPXStream &other) = delete;
StreamKind getKind() const override { return strJPX; }
void reset() override;
void close() override;
......@@ -42,8 +46,6 @@ public:
return str->doGetChars(nChars, buffer);
}
private:
JPXStream(const JPXStream &other);
JPXStream& operator=(const JPXStream &other);
JPXStreamPrivate *priv;
void init();
......
......@@ -49,6 +49,9 @@ public:
SignatureInfo(SignatureValidationStatus, CertificateValidationStatus);
~SignatureInfo();
SignatureInfo(const SignatureInfo &) = delete;
SignatureInfo& operator=(const SignatureInfo &) = delete;
/* GETTERS */
SignatureValidationStatus getSignatureValStatus();
CertificateValidationStatus getCertificateValStatus();
......@@ -74,9 +77,6 @@ public:
void setCertificateInfo(std::unique_ptr<X509CertificateInfo>);
private:
SignatureInfo(const SignatureInfo &);
SignatureInfo& operator=(const SignatureInfo &);
SignatureValidationStatus sig_status;
CertificateValidationStatus cert_status;
std::unique_ptr<X509CertificateInfo> cert_info;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment