From: Yedidya Feldblum Date: Wed, 29 Mar 2017 17:17:46 +0000 (-0700) Subject: Cut extraneous typename in StringKeyedCommon.h X-Git-Tag: v2017.04.03.00~10 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=c58b599184337ab2a48d96f4f055bc71ecd6ba29;p=folly.git Cut extraneous typename in StringKeyedCommon.h Summary: [Folly] Cut extraneous typename in `StringKeyedCommon.h`. In this case, `typename` is optional, and, to avoid confusion, should be removed. "In this case" means in a template definition, with a qualified non-dependent name. Reviewed By: ericniebler Differential Revision: D4792087 fbshipit-source-id: dbb9d2c747432a1f9bc8823e72a7668e78a2fbaa --- diff --git a/folly/experimental/StringKeyedCommon.h b/folly/experimental/StringKeyedCommon.h index eed9d101..c79d7b7c 100644 --- a/folly/experimental/StringKeyedCommon.h +++ b/folly/experimental/StringKeyedCommon.h @@ -28,7 +28,7 @@ StringPiece stringPieceDup(StringPiece piece, const Alloc& alloc) { auto size = piece.size(); auto keyDup = typename Alloc::template rebind::other(alloc) .allocate(size); - memcpy(keyDup, piece.data(), size * sizeof(typename StringPiece::value_type)); + memcpy(keyDup, piece.data(), size * sizeof(StringPiece::value_type)); return StringPiece(keyDup, size); }