OSDN Git Service

Fix google-explicit-constructor warnings in common_time.
authorChih-Hung Hsieh <chh@google.com>
Mon, 15 Aug 2016 21:51:48 +0000 (14:51 -0700)
committerChih-Hung Hsieh <chh@google.com>
Mon, 15 Aug 2016 21:51:48 +0000 (14:51 -0700)
* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: Ieab4756042e77cfadda35e34f78f515058ae0bb3

libs/common_time/common_clock_service.h
libs/common_time/common_time_config_service.h

index bd663f0..aea507e 100644 (file)
@@ -53,7 +53,7 @@ class CommonClockService : public BnCommonClock,
     void notifyOnTimelineChanged(uint64_t timelineID);
 
   private:
-    CommonClockService(CommonTimeServer& timeServer)
+    explicit CommonClockService(CommonTimeServer& timeServer)
         : mTimeServer(timeServer) { };
 
     virtual void binderDied(const wp<IBinder>& who);
index 89806dd..23abb1a 100644 (file)
@@ -49,7 +49,7 @@ class CommonTimeConfigService : public BnCommonTimeConfig {
     virtual status_t forceNetworklessMasterMode();
 
   private:
-    CommonTimeConfigService(CommonTimeServer& timeServer)
+    explicit CommonTimeConfigService(CommonTimeServer& timeServer)
         : mTimeServer(timeServer) { }
     CommonTimeServer& mTimeServer;