summaryrefslogtreecommitdiffstats
path: root/src/io
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-06-15 17:02:56 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2018-06-18 12:27:01 +0000
commit004e50d84773242a000f5cadb89466bbc793e1a8 (patch)
tree019c32e65caa08fe7cf90b521787531a7b1d2225 /src/io
parentRun clang-tidy’s modernize-use-nullptr pass. (diff)
downloadinkscape-004e50d84773242a000f5cadb89466bbc793e1a8.tar.gz
inkscape-004e50d84773242a000f5cadb89466bbc793e1a8.zip
Run clang-tidy’s modernize-use-equals-default pass.
This replaces empty constructors and destructors with the default keyword.
Diffstat (limited to 'src/io')
-rw-r--r--src/io/bufferstream.cpp7
-rw-r--r--src/io/inkscapestream.h26
-rw-r--r--src/io/stringstream.cpp10
3 files changed, 18 insertions, 25 deletions
diff --git a/src/io/bufferstream.cpp b/src/io/bufferstream.cpp
index ba440254f..9a79f4e1b 100644
--- a/src/io/bufferstream.cpp
+++ b/src/io/bufferstream.cpp
@@ -56,9 +56,7 @@ BufferInputStream::BufferInputStream(
*
*/
BufferInputStream::~BufferInputStream()
-{
-
-}
+= default;
/**
* Returns the number of bytes that can be read (or skipped over) from
@@ -114,8 +112,7 @@ BufferOutputStream::BufferOutputStream()
*
*/
BufferOutputStream::~BufferOutputStream()
-{
-}
+= default;
/**
* Closes this output stream and releases any system resources
diff --git a/src/io/inkscapestream.h b/src/io/inkscapestream.h
index 536a121ce..da6d320d8 100644
--- a/src/io/inkscapestream.h
+++ b/src/io/inkscapestream.h
@@ -26,7 +26,7 @@ public:
StreamException(Glib::ustring &theReason) throw()
{ reason = theReason; }
~StreamException() throw() override
- { }
+ = default;
char const *what() const throw() override
{ return reason.c_str(); }
@@ -54,12 +54,12 @@ public:
/**
* Constructor.
*/
- InputStream() {}
+ InputStream() = default;
/**
* Destructor
*/
- virtual ~InputStream() {}
+ virtual ~InputStream() = default;
/**
* Return the number of bytes that are currently available
@@ -102,7 +102,7 @@ public:
BasicInputStream(InputStream &sourceStream);
- ~BasicInputStream() override {}
+ ~BasicInputStream() override = default;
int available() override;
@@ -164,12 +164,12 @@ public:
/**
* Constructor.
*/
- OutputStream() {}
+ OutputStream() = default;
/**
* Destructor
*/
- virtual ~OutputStream() {}
+ virtual ~OutputStream() = default;
/**
* This call should
@@ -206,7 +206,7 @@ public:
BasicOutputStream(OutputStream &destinationStream);
- ~BasicOutputStream() override {}
+ ~BasicOutputStream() override = default;
void close() override;
@@ -263,12 +263,12 @@ public:
/**
* Constructor.
*/
- Reader() {}
+ Reader() = default;
/**
* Destructor
*/
- virtual ~Reader() {}
+ virtual ~Reader() = default;
virtual int available() = 0;
@@ -324,7 +324,7 @@ public:
BasicReader(Reader &sourceStream);
- ~BasicReader() override {}
+ ~BasicReader() override = default;
int available() override;
@@ -459,12 +459,12 @@ public:
/**
* Constructor.
*/
- Writer() {}
+ Writer() = default;
/**
* Destructor
*/
- virtual ~Writer() {}
+ virtual ~Writer() = default;
virtual void close() = 0;
@@ -517,7 +517,7 @@ public:
BasicWriter(Writer &destinationWriter);
- ~BasicWriter() override {}
+ ~BasicWriter() override = default;
/*Overload these 3 for your implementation*/
void close() override;
diff --git a/src/io/stringstream.cpp b/src/io/stringstream.cpp
index 5a76e24a3..62918ffa5 100644
--- a/src/io/stringstream.cpp
+++ b/src/io/stringstream.cpp
@@ -37,9 +37,7 @@ StringInputStream::StringInputStream(Glib::ustring &sourceString)
*
*/
StringInputStream::~StringInputStream()
-{
-
-}
+= default;
/**
* Returns the number of bytes that can be read (or skipped over) from
@@ -82,15 +80,13 @@ int StringInputStream::get()
*
*/
StringOutputStream::StringOutputStream()
-{
-}
+= default;
/**
*
*/
StringOutputStream::~StringOutputStream()
-{
-}
+= default;
/**
* Closes this output stream and releases any system resources