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

Commit daaefc00 authored by Chih-hung Hsieh's avatar Chih-hung Hsieh Committed by android-build-merger
Browse files

Merge "Fix/suppress cmds/lshal google-explicit-constructor warnings"

am: ff9a870b

Change-Id: If5f6703d481cfee0bfbfb7d91bb8477e2eb5b660
parents 6ff0b788 ff9a870b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -27,7 +27,7 @@ class Lshal;
// Base class for all *Commands
// Base class for all *Commands
class Command {
class Command {
public:
public:
    Command(Lshal& lshal) : mLshal(lshal) {}
    explicit Command(Lshal& lshal) : mLshal(lshal) {}
    virtual ~Command() = default;
    virtual ~Command() = default;
    // Expect optind to be set by Lshal::main and points to the next argument
    // Expect optind to be set by Lshal::main and points to the next argument
    // to process.
    // to process.
+1 −1
Original line number Original line Diff line number Diff line
@@ -31,7 +31,7 @@ class Lshal;


class DebugCommand : public Command {
class DebugCommand : public Command {
public:
public:
    DebugCommand(Lshal &lshal) : Command(lshal) {}
    explicit DebugCommand(Lshal &lshal) : Command(lshal) {}
    ~DebugCommand() = default;
    ~DebugCommand() = default;
    Status main(const Arg &arg) override;
    Status main(const Arg &arg) override;
    void usage() const override;
    void usage() const override;
+1 −1
Original line number Original line Diff line number Diff line
@@ -31,7 +31,7 @@ class Lshal;


class HelpCommand : public Command {
class HelpCommand : public Command {
public:
public:
    HelpCommand(Lshal &lshal) : Command(lshal) {}
    explicit HelpCommand(Lshal &lshal) : Command(lshal) {}
    ~HelpCommand() = default;
    ~HelpCommand() = default;
    Status main(const Arg &arg) override;
    Status main(const Arg &arg) override;
    void usage() const override;
    void usage() const override;
+1 −1
Original line number Original line Diff line number Diff line
@@ -57,7 +57,7 @@ enum class HalType {


class ListCommand : public Command {
class ListCommand : public Command {
public:
public:
    ListCommand(Lshal &lshal) : Command(lshal) {}
    explicit ListCommand(Lshal &lshal) : Command(lshal) {}
    virtual ~ListCommand() = default;
    virtual ~ListCommand() = default;
    Status main(const Arg &arg) override;
    Status main(const Arg &arg) override;
    void usage() const override;
    void usage() const override;
+3 −3
Original line number Original line Diff line number Diff line
@@ -25,8 +25,8 @@ namespace lshal {
template<typename S>
template<typename S>
class NullableOStream {
class NullableOStream {
public:
public:
    NullableOStream(S &os) : mOs(&os) {}
    explicit NullableOStream(S &os) : mOs(&os) {}
    NullableOStream(S *os) : mOs(os) {}
    explicit NullableOStream(S *os) : mOs(os) {}
    NullableOStream &operator=(S &os) {
    NullableOStream &operator=(S &os) {
        mOs = &os;
        mOs = &os;
        return *this;
        return *this;
@@ -57,7 +57,7 @@ public:
    S& buf() const {
    S& buf() const {
        return *mOs;
        return *mOs;
    }
    }
    operator bool() const {
    operator bool() const { // NOLINT(google-explicit-constructor)
        return mOs != nullptr;
        return mOs != nullptr;
    }
    }
private:
private:
Loading