X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FPadded.h;h=aa2ddd369de44133c34dc811021c02164dd0a94b;hb=5b8add09a804f52169f96db1ee73e33acf8a56ae;hp=d474b850da5e73be0185f767d0c735b1cb337479;hpb=dee8a5180aa542d98d1b71c74f83a006e4627952;p=folly.git diff --git a/folly/Padded.h b/folly/Padded.h index d474b850..aa2ddd36 100644 --- a/folly/Padded.h +++ b/folly/Padded.h @@ -345,8 +345,9 @@ class Adaptor { lastCount_(lastCount) { } explicit Adaptor(size_t n, const value_type& value = value_type()) - : c_(Node::nodeCount(n), fullNode(value)), - lastCount_(n % Node::kElementCount ?: Node::kElementCount) { + : c_(Node::nodeCount(n), fullNode(value)) { + const auto count = n % Node::kElementCount; + lastCount_ = count != 0 ? count : Node::kElementCount; } Adaptor(const Adaptor&) = default;