Skip to content

Commit 01adfd1

Browse files
committed
Fixed various warnings about return values.
1 parent 3b1568a commit 01adfd1

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/Application.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ namespace chesspp
99
{
1010
class Application : public SFMLEvent
1111
{
12+
protected:
13+
Application(const Application&);
14+
Application &operator=(const Application&);
15+
1216
public:
13-
Application() : running(true), display(sf::VideoMode(640, 640), "ChessPlusPlus") {}
14-
15-
Application(const Application&) {}
16-
Application &operator=(const Application&) {}
17+
Application() : display(sf::VideoMode(640, 640), "ChessPlusPlus"), running(true) {}
1718

1819
bool onInit();
1920
void onEvent(sf::Event *Event);

src/exception.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ namespace chesspp
77
{
88
class exception
99
{
10+
protected:
11+
exception &operator=(const exception &) throw();
12+
1013
public:
1114
exception() throw() {}
1215
exception(const std::string &_e) throw() : e(_e) {}
1316
exception(const exception &) throw() {}
14-
exception &operator=(const exception &) throw() {}
15-
virtual ~exception() throw() {}
17+
virtual ~exception() throw() {};
1618

1719
virtual std::string what() const throw() {return e;}
1820
private:

0 commit comments

Comments
 (0)