Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(490)

Unified Diff: gin/wrappable_unittest.cc

Issue 1995983002: Fix "unused variable" warnings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gin/wrappable_unittest.cc
diff --git a/gin/wrappable_unittest.cc b/gin/wrappable_unittest.cc
index e773d2d283940c2d042d5c0662c94faf9111080f..905346e64e27620ee64e0f015453879aaea37cc9 100644
--- a/gin/wrappable_unittest.cc
+++ b/gin/wrappable_unittest.cc
@@ -16,11 +16,17 @@
namespace gin {
+// This useless base class ensures that the value of a pointer to a MyObject
+// (below) is not the same as the value of that pointer cast to the object's
+// WrappableBase base.
class BaseClass {
public:
BaseClass() : value_(23) {}
virtual ~BaseClass() {}
+ // So the compiler doesn't complain that |value_| is unused.
+ int value() const { return value_; }
+
private:
int value_;

Powered by Google App Engine
This is Rietveld 408576698