Merge "Fix/suppress hwui google-explicit-constructor warnings"

This commit is contained in:
Treehugger Robot
2019-01-09 22:35:27 +00:00
committed by Gerrit Code Review
6 changed files with 12 additions and 12 deletions

View File

@@ -80,7 +80,7 @@ public:
explicit Matrix4(const float* v) { load(v); } explicit Matrix4(const float* v) { load(v); }
Matrix4(const SkMatrix& v) { // NOLINT, implicit Matrix4(const SkMatrix& v) { // NOLINT(google-explicit-constructor)
load(v); load(v);
} }

View File

@@ -57,15 +57,15 @@ public:
inline Rect(float width, float height) : left(0.0f), top(0.0f), right(width), bottom(height) {} inline Rect(float width, float height) : left(0.0f), top(0.0f), right(width), bottom(height) {}
inline Rect(const SkIRect& rect) inline Rect(const SkIRect& rect) // NOLINT(google-explicit-constructor)
: // NOLINT, implicit :
left(rect.fLeft) left(rect.fLeft)
, top(rect.fTop) , top(rect.fTop)
, right(rect.fRight) , right(rect.fRight)
, bottom(rect.fBottom) {} , bottom(rect.fBottom) {}
inline Rect(const SkRect& rect) inline Rect(const SkRect& rect) // NOLINT(google-explicit-constructor)
: // NOLINT, implicit :
left(rect.fLeft) left(rect.fLeft)
, top(rect.fTop) , top(rect.fTop)
, right(rect.fRight) , right(rect.fRight)

View File

@@ -24,7 +24,7 @@ namespace debug {
class GlesErrorCheckWrapper : public GlesDriver { class GlesErrorCheckWrapper : public GlesDriver {
public: public:
GlesErrorCheckWrapper(GlesDriver& base) : mBase(base) {} explicit GlesErrorCheckWrapper(GlesDriver& base) : mBase(base) {}
#define GL_ENTRY(ret, api, ...) virtual ret api##_(__VA_ARGS__) override; #define GL_ENTRY(ret, api, ...) virtual ret api##_(__VA_ARGS__) override;
#include "gles_decls.in" #include "gles_decls.in"

View File

@@ -45,7 +45,7 @@ public:
Paint(); Paint();
Paint(const Paint& paint); Paint(const Paint& paint);
Paint(const SkPaint& paint); // NOLINT(implicit) Paint(const SkPaint& paint); // NOLINT(google-explicit-constructor)
~Paint(); ~Paint();
Paint& operator=(const Paint& other); Paint& operator=(const Paint& other);

View File

@@ -48,7 +48,7 @@ static void dumpAsTextToFd(protos::GraphicsStatsProto* proto, int outFd);
class FileDescriptor { class FileDescriptor {
public: public:
FileDescriptor(int fd) : mFd(fd) {} explicit FileDescriptor(int fd) : mFd(fd) {}
~FileDescriptor() { ~FileDescriptor() {
if (mFd != -1) { if (mFd != -1) {
close(mFd); close(mFd);
@@ -56,7 +56,7 @@ public:
} }
} }
bool valid() { return mFd != -1; } bool valid() { return mFd != -1; }
operator int() { return mFd; } operator int() { return mFd; } // NOLINT(google-explicit-constructor)
private: private:
int mFd; int mFd;
@@ -64,7 +64,7 @@ private:
class FileOutputStreamLite : public io::ZeroCopyOutputStream { class FileOutputStreamLite : public io::ZeroCopyOutputStream {
public: public:
FileOutputStreamLite(int fd) : mCopyAdapter(fd), mImpl(&mCopyAdapter) {} explicit FileOutputStreamLite(int fd) : mCopyAdapter(fd), mImpl(&mCopyAdapter) {}
virtual ~FileOutputStreamLite() {} virtual ~FileOutputStreamLite() {}
int GetErrno() { return mCopyAdapter.mErrno; } int GetErrno() { return mCopyAdapter.mErrno; }
@@ -82,7 +82,7 @@ private:
int mFd; int mFd;
int mErrno = 0; int mErrno = 0;
FDAdapter(int fd) : mFd(fd) {} explicit FDAdapter(int fd) : mFd(fd) {}
virtual ~FDAdapter() {} virtual ~FDAdapter() {}
virtual bool Write(const void* buffer, int size) override { virtual bool Write(const void* buffer, int size) override {

View File

@@ -168,7 +168,7 @@ public:
}; };
// enable allocators to be constructed from other templated types // enable allocators to be constructed from other templated types
template <class U> template <class U>
LinearStdAllocator(const LinearStdAllocator<U>& other) // NOLINT(implicit) LinearStdAllocator(const LinearStdAllocator<U>& other) // NOLINT(google-explicit-constructor)
: linearAllocator(other.linearAllocator) {} : linearAllocator(other.linearAllocator) {}
T* allocate(size_t num, const void* = 0) { T* allocate(size_t num, const void* = 0) {