Skip to content

Commit

Permalink
Enable google-explicit-constructor (shared/oatmeal)
Browse files Browse the repository at this point in the history
Summary: Enable clang-tidy checks for explicit single-parameter constructors.

Reviewed By: amnn

Differential Revision: D20283559

fbshipit-source-id: a2ef7091116e437a0d04360c66aa2004e2650f0e
  • Loading branch information
agampe authored and facebook-github-bot committed Mar 13, 2020
1 parent a6a335f commit 261465e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion shared/QuickData.h
Expand Up @@ -44,7 +44,7 @@ class QuickData {

public:
// Read Mode
QuickData(const char* location);
explicit QuickData(const char* location);

// Write Mode
QuickData() = default;
Expand Down
6 changes: 4 additions & 2 deletions tools/oatmeal/memory-accounter.cpp
Expand Up @@ -46,7 +46,7 @@ class MemoryAccounterImpl : public MemoryAccounter {
UNCOPYABLE(MemoryAccounterImpl);
MOVABLE(MemoryAccounterImpl);

MemoryAccounterImpl(ConstBuffer buf) : buf_(buf) {
explicit MemoryAccounterImpl(ConstBuffer buf) : buf_(buf) {
// mark end to avoid special case in print.
consumed_ranges_.emplace_back(buf_.len, buf_.len);
}
Expand Down Expand Up @@ -139,7 +139,9 @@ class MultiBufferMemoryAccounter : public MemoryAccounter {
MOVABLE(MultiBufferMemoryAccounter);
UNCOPYABLE(MultiBufferMemoryAccounter);

MultiBufferMemoryAccounter(ConstBuffer buf) { accounters_.emplace_back(buf); }
explicit MultiBufferMemoryAccounter(ConstBuffer buf) {
accounters_.emplace_back(buf);
}

void print() override;

Expand Down

0 comments on commit 261465e

Please sign in to comment.