From 40a1e31fa5b5c6a1b6c99291c8acf9b19fc0113a Mon Sep 17 00:00:00 2001 From: Siying Dong Date: Thu, 10 Oct 2013 11:42:18 -0700 Subject: [PATCH] Minor: Fix a lint error in cache_test.cc Summary: As title. Fix an lint error: Lint: CppLint Error Single-argument constructor 'Value(int v)' may inadvertently be used as a type conversion constructor. Prefix the function with the 'explicit' keyword to avoid this, or add an /* implicit */ comment to suppress this warning. Test Plan: N/A Reviewers: emayanke, haobo, dhruba Reviewed By: emayanke CC: leveldb Differential Revision: https://reviews.facebook.net/D13401 --- util/cache_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/cache_test.cc b/util/cache_test.cc index 16321559c0..00c02589ac 100644 --- a/util/cache_test.cc +++ b/util/cache_test.cc @@ -185,7 +185,7 @@ class Value { private: int v_; public: - Value(int v) : v_(v) { } + explicit Value(int v) : v_(v) { } ~Value() { std::cout << v_ << " is destructed\n"; } };