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
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Checks: >
-modernize-pass-by-value,
-modernize-return-braced-init-list,
-modernize-use-auto,
-modernize-use-equals-delete,
-modernize-use-nodiscard,
-modernize-use-trailing-return-type,
-readability-avoid-nested-conditional-operator,
Expand Down
6 changes: 3 additions & 3 deletions simplecpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,9 @@ class FileStream : public simplecpp::TokenList::Stream {
init();
}

FileStream(const FileStream&) = delete;
FileStream &operator=(const FileStream&) = delete;

~FileStream() override {
fclose(file);
file = nullptr;
Expand Down Expand Up @@ -459,9 +462,6 @@ class FileStream : public simplecpp::TokenList::Stream {
ungetc(ch, file);
}

FileStream(const FileStream&);
FileStream &operator=(const FileStream&);

FILE *file;
int lastCh{};
int lastStatus{};
Expand Down
5 changes: 2 additions & 3 deletions simplecpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ namespace simplecpp {
Token(const Token &tok) :
macro(tok.macro), op(tok.op), comment(tok.comment), name(tok.name), number(tok.number), whitespaceahead(tok.whitespaceahead), location(tok.location), string(tok.string), mExpandedFrom(tok.mExpandedFrom) {}

Token &operator=(const Token &tok) = delete;

const TokenString& str() const {
return string;
}
Expand Down Expand Up @@ -195,9 +197,6 @@ namespace simplecpp {
TokenString string;

std::set<const Macro*> mExpandedFrom;

// Not implemented - prevent assignment
Token &operator=(const Token &tok);
};

/** Output from preprocessor */
Expand Down