Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Debug.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class LogUtil //replaces std::clog, std::cerr, std::cout with file streams
{
static LogUtil lu;
}
~LogUtil() noexcept
~LogUtil()
{
std::clog.rdbuf(clogbuf), clogbuf = nullptr;
std::cerr.rdbuf(cerrbuf), cerrbuf = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion src/Exception.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace chesspp
Exception(Exception &&) noexcept = default;
Exception &operator=(Exception const &) = default;
Exception &operator=(Exception &&) = default;
virtual ~Exception() noexcept = default;
virtual ~Exception() = default;

virtual bool operator==(std::exception const &other) const noexcept
{
Expand Down
1 change: 1 addition & 0 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Style Guide & Coding Conventions
- Prefer inlining functions, ctors, and dtors, so long as they do not increase header file coupling.
- Try to make as many functions `noexcept` as possible, or at least use the conditional `noexcept` syntax.
- If a function is known for throwing exceptions, write `noexcept(false)` as a visual indicator.
- Destructors are `noexcept(true)` by default, do not put the `noexcept` specifier on a dtor unless it is conditional or `noexcept(false)`.
- Try to avoid excess or repetitive "access:" specifiers.
- Avoid strange spaces before open parens and open braces and in other places unless you are lining up code with other code for readability and emphasis of relation.
- There is no line character limit, but that is because you shouldn't have exceedingly long lines (unless they just have exceedingly long identifiers). Instead, avoid deeply nested compound expressions - they reduce readability and hinder understanding of what code is for and/or doing.
Expand Down
2 changes: 1 addition & 1 deletion src/ResourceManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace chesspp
ResourceManager() noexcept
{
}
~ResourceManager() noexcept
~ResourceManager()
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/SFMLEvent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace chesspp
virtual void OnJoystickConnected (uint joystickID) noexcept {}
virtual void OnJoystickDisconnected (uint joystickID) noexcept {}

virtual ~SFMLEvent() noexcept
virtual ~SFMLEvent()
{
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/board/Board.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace chesspp
Piece *selectedPiece = nullptr;

Board();
~Board() noexcept;
~Board();

// Loads the game from new_game.txt
bool newGame(std::string const &fileName);
Expand Down
2 changes: 1 addition & 1 deletion src/config/Configuration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ namespace chesspp
Configuration(const std::string &configFile) noexcept(false) : res_path(getResourcePath()), reader(std::ifstream(getResourcePath() + configFile))
{
}
virtual ~Configuration() noexcept
virtual ~Configuration()
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/util/JsonReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace chesspp
JsonReader(std::istream &&s) noexcept(false) : JsonReader(s)
{
}
~JsonReader() noexcept
~JsonReader()
{
json_value_free(json), json = nullptr;
}
Expand All @@ -49,7 +49,7 @@ namespace chesspp
NestedValue(NestedValue const &) noexcept = default;
NestedValue(NestedValue &&) noexcept = default;
NestedValue &operator=(NestedValue &&) noexcept = default;
~NestedValue() noexcept = default;
~NestedValue() = default;

json_type type() const noexcept //may wish to add an abstraction layer between json-parser
{
Expand Down