summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpp/rsCppStructs.h6
-rw-r--r--cpp/util/RefBase.h10
-rw-r--r--cpp/util/StrongPointer.h6
-rw-r--r--cpp/util/TypeHelpers.h2
-rw-r--r--rsAllocation.h2
-rw-r--r--rsAnimation.h2
-rw-r--r--rsContext.h2
-rw-r--r--rsCppUtils.h2
-rw-r--r--rsElement.h2
-rw-r--r--rsFileA3D.h2
-rw-r--r--rsFont.h2
-rw-r--r--rsList.h2
-rw-r--r--rsMesh.h2
-rw-r--r--rsObjectBase.h4
-rw-r--r--rsProgramBase.h2
-rw-r--r--rsSampler.h2
-rw-r--r--rsScript.h2
-rw-r--r--rsScriptC.h2
-rw-r--r--rsScriptGroup.h6
-rw-r--r--rsScriptGroupBase.h2
-rw-r--r--rsScriptIntrinsic.h2
-rw-r--r--rsType.h2
22 files changed, 33 insertions, 33 deletions
diff --git a/cpp/rsCppStructs.h b/cpp/rsCppStructs.h
index 18023864..a3e65ab9 100644
--- a/cpp/rsCppStructs.h
+++ b/cpp/rsCppStructs.h
@@ -1412,7 +1412,7 @@ public:
bool mSkipPadding;
public:
- Builder(sp<RS> rs);
+ explicit Builder(sp<RS> rs);
~Builder();
void add(sp<const Element> e, const char * name, uint32_t arraySize = 1);
sp<const Element> create();
@@ -1428,7 +1428,7 @@ protected:
uint32_t * arraySizes);
Element(void *id, sp<RS> rs, RsDataType dt, RsDataKind dk, bool norm, uint32_t size);
Element(void *id, sp<RS> rs);
- Element(sp<RS> rs);
+ explicit Element(sp<RS> rs);
virtual ~Element();
private:
@@ -1458,7 +1458,7 @@ protected:
size_t mLen;
public:
- FieldPacker(size_t len)
+ explicit FieldPacker(size_t len)
: mPos(0), mLen(len) {
mData = new unsigned char[len];
}
diff --git a/cpp/util/RefBase.h b/cpp/util/RefBase.h
index 01c0b5f3..40bb7bc0 100644
--- a/cpp/util/RefBase.h
+++ b/cpp/util/RefBase.h
@@ -202,12 +202,12 @@ public:
inline wp() : m_ptr(0) { }
- wp(T* other);
+ explicit wp(T* other);
wp(const wp<T>& other);
- wp(const sp<T>& other);
- template<typename U> wp(U* other);
- template<typename U> wp(const sp<U>& other);
- template<typename U> wp(const wp<U>& other);
+ explicit wp(const sp<T>& other);
+ template<typename U> explicit wp(U* other);
+ template<typename U> explicit wp(const sp<U>& other);
+ template<typename U> explicit wp(const wp<U>& other);
~wp();
diff --git a/cpp/util/StrongPointer.h b/cpp/util/StrongPointer.h
index 0f68615c..a9995ba8 100644
--- a/cpp/util/StrongPointer.h
+++ b/cpp/util/StrongPointer.h
@@ -65,10 +65,10 @@ class sp
public:
inline sp() : m_ptr(0) { }
- sp(T* other);
+ sp(T* other); // NOLINT, implicit
sp(const sp<T>& other);
- template<typename U> sp(U* other);
- template<typename U> sp(const sp<U>& other);
+ template<typename U> sp(U* other); // NOLINT, implicit
+ template<typename U> sp(const sp<U>& other); // NOLINT, implicit
~sp();
diff --git a/cpp/util/TypeHelpers.h b/cpp/util/TypeHelpers.h
index 33a5201f..e738cd3f 100644
--- a/cpp/util/TypeHelpers.h
+++ b/cpp/util/TypeHelpers.h
@@ -233,7 +233,7 @@ struct key_value_pair_t {
key_value_pair_t() { }
key_value_pair_t(const key_value_pair_t& o) : key(o.key), value(o.value) { }
key_value_pair_t(const KEY& k, const VALUE& v) : key(k), value(v) { }
- key_value_pair_t(const KEY& k) : key(k) { }
+ explicit key_value_pair_t(const KEY& k) : key(k) { }
inline bool operator < (const key_value_pair_t& o) const {
return strictly_order_type(key, o.key);
}
diff --git a/rsAllocation.h b/rsAllocation.h
index 4d09679e..0f60150b 100644
--- a/rsAllocation.h
+++ b/rsAllocation.h
@@ -223,7 +223,7 @@ protected:
#if !defined(RS_SERVER) && !defined(RS_COMPATIBILITY_LIB)
class NewBufferListener : public android::ConsumerBase::FrameAvailableListener {
public:
- NewBufferListener(uint32_t numAlloc);
+ explicit NewBufferListener(uint32_t numAlloc);
virtual ~NewBufferListener();
const android::renderscript::Context *rsc;
const android::renderscript::Allocation **alloc;
diff --git a/rsAnimation.h b/rsAnimation.h
index de4957e8..f77d3cbf 100644
--- a/rsAnimation.h
+++ b/rsAnimation.h
@@ -41,7 +41,7 @@ public:
static Animation *createFromStream(Context *rsc, IStream *stream);
protected:
- Animation(Context *rsc);
+ explicit Animation(Context *rsc);
diff --git a/rsContext.h b/rsContext.h
index 4a8cd291..fe771ec5 100644
--- a/rsContext.h
+++ b/rsContext.h
@@ -102,7 +102,7 @@ public:
class PushState {
public:
- PushState(Context *);
+ explicit PushState(Context *);
~PushState();
private:
diff --git a/rsCppUtils.h b/rsCppUtils.h
index 606046ed..3da0d034 100644
--- a/rsCppUtils.h
+++ b/rsCppUtils.h
@@ -65,7 +65,7 @@ namespace android {
// server has no Vector or String8 classes; implement on top of STL
class String8: public std::string {
public:
- String8(const char *ptr) : std::string(ptr) {
+ explicit String8(const char *ptr) : std::string(ptr) {
}
String8(const char *ptr, size_t len) : std::string(ptr, len) {
diff --git a/rsElement.h b/rsElement.h
index 9374c64a..d8f101ba 100644
--- a/rsElement.h
+++ b/rsElement.h
@@ -152,7 +152,7 @@ protected:
virtual ~Element();
- Element(Context *);
+ explicit Element(Context *);
Component mComponent;
uint32_t mBitsUnpadded;
diff --git a/rsFileA3D.h b/rsFileA3D.h
index 8bf36b97..ae74455d 100644
--- a/rsFileA3D.h
+++ b/rsFileA3D.h
@@ -32,7 +32,7 @@ namespace renderscript {
class FileA3D : public ObjectBase {
public:
- FileA3D(Context *rsc);
+ explicit FileA3D(Context *rsc);
~FileA3D();
uint32_t mMajorVersion;
diff --git a/rsFont.h b/rsFont.h
index 0f173408..3be5c3cc 100644
--- a/rsFont.h
+++ b/rsFont.h
@@ -116,7 +116,7 @@ protected:
float mFontSize;
uint32_t mDpi;
- Font(Context *rsc);
+ explicit Font(Context *rsc);
bool init(const char *name, float fontSize, uint32_t dpi, const void *data = nullptr, uint32_t dataLen = 0);
virtual void preDestroy() const;
diff --git a/rsList.h b/rsList.h
index 24720a26..052ec77e 100644
--- a/rsList.h
+++ b/rsList.h
@@ -92,7 +92,7 @@ public:
T* operator->() { return p; }
protected:
- iterator(const List* list_) : list(list_) {}
+ explicit iterator(const List* list_) : list(list_) {}
iterator(const List* list_, LinkedBuffer* buffer_, T* p_) :
p(p_), buffer(buffer_), list(list_) {}
diff --git a/rsMesh.h b/rsMesh.h
index c7ee0883..6c605553 100644
--- a/rsMesh.h
+++ b/rsMesh.h
@@ -55,7 +55,7 @@ public:
};
Hal mHal;
- Mesh(Context *);
+ explicit Mesh(Context *);
Mesh(Context *, uint32_t vertexBuffersCount, uint32_t primitivesCount);
~Mesh();
diff --git a/rsObjectBase.h b/rsObjectBase.h
index c51d85cb..4f29e572 100644
--- a/rsObjectBase.h
+++ b/rsObjectBase.h
@@ -35,7 +35,7 @@ public:
static const bool gDebugLeaks = false;
static const bool gDebugLifetime = false;
- ObjectBase(Context *rsc);
+ ObjectBase(Context *rsc); // NOLINT, implicit
void incSysRef() const;
bool decSysRef() const;
@@ -111,7 +111,7 @@ public:
}
}
- ObjectBaseRef(T *ref) {
+ ObjectBaseRef(T *ref) { // NOLINT, implicit
mRef = ref;
if (mRef) {
ref->incSysRef();
diff --git a/rsProgramBase.h b/rsProgramBase.h
index 80da453a..aeee5c16 100644
--- a/rsProgramBase.h
+++ b/rsProgramBase.h
@@ -26,7 +26,7 @@ namespace renderscript {
class ProgramBase : public ObjectBase {
public:
- ProgramBase(Context *rsc) : ObjectBase(rsc) {
+ explicit ProgramBase(Context *rsc) : ObjectBase(rsc) {
mDirty = true;
}
diff --git a/rsSampler.h b/rsSampler.h
index 2fdf7073..c63a4a8e 100644
--- a/rsSampler.h
+++ b/rsSampler.h
@@ -74,7 +74,7 @@ protected:
virtual ~Sampler();
private:
- Sampler(Context *);
+ explicit Sampler(Context *);
Sampler(Context *,
RsSamplerValue magFilter,
RsSamplerValue minFilter,
diff --git a/rsScript.h b/rsScript.h
index e336f07b..39620c16 100644
--- a/rsScript.h
+++ b/rsScript.h
@@ -98,7 +98,7 @@ public:
};
Hal mHal;
- Script(Context *);
+ explicit Script(Context *);
virtual ~Script();
struct Enviroment_t {
diff --git a/rsScriptC.h b/rsScriptC.h
index 6c34215b..3c342d42 100644
--- a/rsScriptC.h
+++ b/rsScriptC.h
@@ -31,7 +31,7 @@ public:
typedef int (*RunScript_t)();
typedef void (*VoidFunc_t)();
- ScriptC(Context *);
+ explicit ScriptC(Context *);
virtual ~ScriptC();
void Invoke(Context *rsc, uint32_t slot, const void *data, size_t len) override;
diff --git a/rsScriptGroup.h b/rsScriptGroup.h
index 68783f39..835d8c02 100644
--- a/rsScriptGroup.h
+++ b/rsScriptGroup.h
@@ -56,7 +56,7 @@ public:
class Node {
public:
- Node(Script *);
+ explicit Node(Script *);
Vector<const ScriptKernelID *> mKernels;
Vector<Link *> mOutputs;
@@ -68,7 +68,7 @@ public:
class IO {
public:
- IO(const ScriptKernelID *);
+ explicit IO(const ScriptKernelID *);
const ScriptKernelID *mKernel;
ObjectBaseRef<Allocation> mAlloc;
@@ -103,7 +103,7 @@ private:
// executes. Skips the exeuction if validation fails.
bool validateInputAndOutput(Context *);
- ScriptGroup(Context *);
+ explicit ScriptGroup(Context *);
};
diff --git a/rsScriptGroupBase.h b/rsScriptGroupBase.h
index 00ae6c6d..f79f08f5 100644
--- a/rsScriptGroupBase.h
+++ b/rsScriptGroupBase.h
@@ -8,7 +8,7 @@ namespace renderscript {
class ScriptGroupBase : public ObjectBase {
public:
- ScriptGroupBase(Context* rsc) : ObjectBase(rsc) {}
+ explicit ScriptGroupBase(Context* rsc) : ObjectBase(rsc) {}
virtual ~ScriptGroupBase() {}
virtual void serialize(Context *rsc, OStream *stream) const {}
diff --git a/rsScriptIntrinsic.h b/rsScriptIntrinsic.h
index 9b4f9d3b..cd8253df 100644
--- a/rsScriptIntrinsic.h
+++ b/rsScriptIntrinsic.h
@@ -30,7 +30,7 @@ public:
ObjectBaseRef<const Element> mElement;
- ScriptIntrinsic(Context *);
+ explicit ScriptIntrinsic(Context *);
~ScriptIntrinsic() override;
bool init(Context *rsc, RsScriptIntrinsicID iid, Element *e);
diff --git a/rsType.h b/rsType.h
index 6ae84466..6e260fad 100644
--- a/rsType.h
+++ b/rsType.h
@@ -150,7 +150,7 @@ protected:
virtual ~Type();
private:
- Type(Context *);
+ explicit Type(Context *);
Type(const Type &);
};