Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0937e64 authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh
Browse files

Fix/suppress google-explicit-constructor warnings

* Add explicit to conversion constructors/operators

Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: I815a5282f1fc0d308835988f40efb666fe06d118
parent babb0276
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ class CommandOptions {
  private:
    class CommandOptionsValues {
      private:
        CommandOptionsValues(int64_t timeout_ms);
        explicit CommandOptionsValues(int64_t timeout_ms);

        int64_t timeout_ms_;
        bool always_;
@@ -88,7 +88,7 @@ class CommandOptions {
        friend class CommandOptionsBuilder;
    };

    CommandOptions(const CommandOptionsValues& values);
    explicit CommandOptions(const CommandOptionsValues& values);

    const CommandOptionsValues values;

@@ -119,7 +119,7 @@ class CommandOptions {
        CommandOptions Build();

      private:
        CommandOptionsBuilder(int64_t timeout_ms);
        explicit CommandOptionsBuilder(int64_t timeout_ms);
        CommandOptionsValues values;
        friend class CommandOptions;
    };
+3 −3
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ extern "C" {
 */
class DurationReporter {
  public:
    DurationReporter(const std::string& title, bool log_only = false);
    explicit DurationReporter(const std::string& title, bool log_only = false);

    ~DurationReporter();

@@ -111,7 +111,7 @@ class Progress {
     */
    static const int kDefaultMax;

    Progress(const std::string& path = "");
    explicit Progress(const std::string& path = "");

    // Gets the current progress.
    int32_t Get() const;
@@ -447,7 +447,7 @@ class Dumpstate {

  private:
    // Used by GetInstance() only.
    Dumpstate(const std::string& version = VERSION_CURRENT);
    explicit Dumpstate(const std::string& version = VERSION_CURRENT);

    DISALLOW_COPY_AND_ASSIGN(Dumpstate);
};
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ namespace android {

class Dumpsys {
  public:
    Dumpsys(android::IServiceManager* sm) : sm_(sm) {
    explicit Dumpsys(android::IServiceManager* sm) : sm_(sm) {
    }
    /**
     * Main entry point into dumpsys.