Skip to content

Commit

Permalink
Merge pull request OpenAtomFoundation#2 from ForestLH/style/clang
Browse files Browse the repository at this point in the history
Style/clang
  • Loading branch information
ForestLH authored May 25, 2023
2 parents 93b7a0d + 9f902dd commit deaa4bb
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Checks: '
-google-runtime-int,
-clang-diagnostic-unused-command-line-argument,
-clang-diagnostic-ignored-optimization-argument,
-readability-implicit-bool-conversion,
'
# CheckOptions:
# - { key: readability-identifier-naming.ClassCase, value: CamelCase }
Expand Down
2 changes: 1 addition & 1 deletion src/net/src/backend_thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ void BackendThread::ProcessNotifyEvents(const NetFiredEvent* pfe) {
std::lock_guard l(mu_);
if (ti.notify_type() == kNotiWrite) {
if (conns_.find(fd) == conns_.end()) {
// TODO: need clean and notify?
// TODO(): need clean and notify?
continue;
} else {
// connection exist
Expand Down
1 change: 0 additions & 1 deletion src/pika_partition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

using pstd::Status;

extern std::unique_ptr<PikaConf> g_pika_conf;
extern PikaServer* g_pika_server;
extern std::unique_ptr<PikaReplicaManager> g_pika_rm;

Expand Down
1 change: 0 additions & 1 deletion src/pika_repl_client_conn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

using pstd::Status;

extern std::unique_ptr<PikaConf> g_pika_conf;
extern PikaServer* g_pika_server;
extern std::unique_ptr<PikaReplicaManager> g_pika_rm;

Expand Down
2 changes: 1 addition & 1 deletion src/pstd/include/pstd_status.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ inline void Status::operator=(const Status& s) {
// and the common case where both s and *this are ok.
if (state_ != s.state_) {
delete[] state_;
state_ = !s.state_ ? nullptr : CopyStte(s.state_);
state_ = !s.state_ ? nullptr : CopyState(s.state_);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/pstd/src/base_conf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ static const int kConfItemLen = 1024 * 1024;

BaseConf::BaseConf(const std::string& path) : rep_(std::make_unique<Rep>(path)) {}

BaseConf::~BaseConf() {}
BaseConf::~BaseConf() = default;

int BaseConf::LoadConf() {
if (!FileExists(rep_->path)) {
Expand Down
2 changes: 1 addition & 1 deletion src/pstd/src/posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ struct hostent* Gethostbyname(const char* name) {
struct hostent* Gethostbyaddr(const char* addr, int len, int type) {
struct hostent* p;

if (!(p = gethostbyaddr(addr, len, type)) {
if (!(p = gethostbyaddr(addr, len, type))) {
LOG(ERROR) << "Gethostbyaddr error: DNS error " << h_errno;
}
return p;
Expand Down
2 changes: 1 addition & 1 deletion src/storage/src/redis_sets.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RedisSets::RedisSets(Storage* const s, const DataType& type) : Redis(s, type) {
spop_counts_store_->SetCapacity(1000);
}

RedisSets::~RedisSets() {}
RedisSets::~RedisSets() = default;

rocksdb::Status RedisSets::Open(const StorageOptions& storage_options, const std::string& db_path) {
statistics_store_->SetCapacity(storage_options.statistics_max_size);
Expand Down

0 comments on commit deaa4bb

Please sign in to comment.