Skip to content

Commit

Permalink
COMMON: Remove empty user-provided destructors
Browse files Browse the repository at this point in the history
Because implicit copy constructors and assignment operators with
user-provided destructors are deprecated in C++11.
  • Loading branch information
DrMcCoy committed May 5, 2019
1 parent b185a76 commit bd8bad1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
9 changes: 0 additions & 9 deletions src/common/error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@

namespace Common {

StackException::StackException() {
}

StackException::StackException(const char *s, ...) {
char buf[STRINGBUFLEN];
va_list va;
Expand All @@ -45,16 +42,10 @@ StackException::StackException(const char *s, ...) {
_stack.push(buf);
}

StackException::StackException(const StackException &e) : _stack(e._stack) {
}

StackException::StackException(const std::exception &e) {
add(e);
}

StackException::~StackException() throw() {
}

void StackException::add(const char *s, ...) {
char buf[STRINGBUFLEN];
va_list va;
Expand Down
6 changes: 3 additions & 3 deletions src/common/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ class StackException : public std::exception {
public:
typedef std::stack<UString> Stack;

StackException();
StackException() = default;
StackException(const char *s, ...) GCC_PRINTF(2, 3);
StackException(const StackException &e);
StackException(const StackException &e) = default;
StackException(const std::exception &e);
~StackException() throw();
~StackException() = default;

void add(const char *s, ...) GCC_PRINTF(2, 3);
void add(const std::exception &e);
Expand Down

0 comments on commit bd8bad1

Please sign in to comment.