Skip to content
Draft
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
3 changes: 1 addition & 2 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ Checks: >
-readability-uppercase-literal-suffix,
-performance-avoid-endl,
-performance-inefficient-string-concatenation,
-performance-no-automatic-move,
-performance-noexcept-move-constructor
-performance-no-automatic-move
HeaderFilterRegex: '.*'
WarningsAsErrors: '*'
CheckOptions:
Expand Down
4 changes: 2 additions & 2 deletions simplecpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ simplecpp::TokenList::TokenList(const TokenList &other) : frontToken(nullptr), b
*this = other;
}

simplecpp::TokenList::TokenList(TokenList &&other) : frontToken(nullptr), backToken(nullptr), files(other.files)
simplecpp::TokenList::TokenList(TokenList &&other) noexcept : frontToken(nullptr), backToken(nullptr), files(other.files)
{
*this = std::move(other);
}
Expand All @@ -521,7 +521,7 @@ simplecpp::TokenList &simplecpp::TokenList::operator=(const TokenList &other)
return *this;
}

simplecpp::TokenList &simplecpp::TokenList::operator=(TokenList &&other)
simplecpp::TokenList &simplecpp::TokenList::operator=(TokenList &&other) noexcept
{
if (this != &other) {
clear();
Expand Down
4 changes: 2 additions & 2 deletions simplecpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,10 @@ namespace simplecpp {
/** generates a token list from the given filename parameter */
TokenList(const std::string &filename, std::vector<std::string> &filenames, OutputList *outputList = nullptr);
TokenList(const TokenList &other);
TokenList(TokenList &&other);
TokenList(TokenList &&other) noexcept;
~TokenList();
TokenList &operator=(const TokenList &other);
TokenList &operator=(TokenList &&other);
TokenList &operator=(TokenList &&other) noexcept;

void clear();
bool empty() const {
Expand Down