mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
Run clang-tidy 'modernize'
Some warnings after a run of: $ clang-tidy-3.8 -checks='modernize-*' *.cpp syzygy/*.cpp -header-filter=.* -- -std=c++11 I have not fixed all suggestions, for instance I still prefer to declare the type instead of a spread use of 'auto'. I also perfer good old 'typedef' to the new 'using' form. I have not fixed some warnings in the last functions of syzygy code because those are still the original functions and need to be completely rewritten anyhow. Thanks to erbsenzaehler for the original idea. No functional change.
This commit is contained in:
@@ -63,10 +63,10 @@ struct Tie: public streambuf { // MSVC requires split streambuf for cin and cout
|
||||
|
||||
Tie(streambuf* b, streambuf* l) : buf(b), logBuf(l) {}
|
||||
|
||||
int sync() { return logBuf->pubsync(), buf->pubsync(); }
|
||||
int overflow(int c) { return log(buf->sputc((char)c), "<< "); }
|
||||
int underflow() { return buf->sgetc(); }
|
||||
int uflow() { return log(buf->sbumpc(), ">> "); }
|
||||
int sync() override { return logBuf->pubsync(), buf->pubsync(); }
|
||||
int overflow(int c) override { return log(buf->sputc((char)c), "<< "); }
|
||||
int underflow() override { return buf->sgetc(); }
|
||||
int uflow() override { return log(buf->sbumpc(), ">> "); }
|
||||
|
||||
streambuf *buf, *logBuf;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user