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

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

Fix/suppress core/jni 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: I15ac3511154b652402c5a21a22ff0c306d806d84
parent bcf293c6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ namespace android {

class BitmapWrapper {
public:
    BitmapWrapper(Bitmap* bitmap)
    explicit BitmapWrapper(Bitmap* bitmap)
        : mBitmap(bitmap) { }

    void freePixels() {
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ class FontFamily;
namespace android {

struct FontFamilyWrapper {
  FontFamilyWrapper(std::shared_ptr<minikin::FontFamily>&& family) : family(family) {}
  explicit FontFamilyWrapper(std::shared_ptr<minikin::FontFamily>&& family) : family(family) {}
  std::shared_ptr<minikin::FontFamily> family;
};

+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@

class GIFMovie : public Movie {
public:
    GIFMovie(SkStream* stream);
    explicit GIFMovie(SkStream* stream);
    virtual ~GIFMovie();

protected:
+1 −1
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ class FileDescriptorInfo {
  const bool is_sock;

 private:
  FileDescriptorInfo(int fd);
  explicit FileDescriptorInfo(int fd);

  FileDescriptorInfo(struct stat stat, const std::string& file_path, int fd, int open_flags,
                     int fd_flags, int fs_flags, off_t offset);
+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ class FileDescriptorTable {
  bool ReopenOrDetach(std::string* error_msg);

 private:
  FileDescriptorTable(const std::unordered_map<int, FileDescriptorInfo*>& map);
  explicit FileDescriptorTable(const std::unordered_map<int, FileDescriptorInfo*>& map);

  bool RestatInternal(std::set<int>& open_fds, std::string* error_msg);