Merge "Fix google-explicit-constructor warnings."
am: 6e35557
* commit '6e35557ad34a9722c27a70b30930104c2f36f78b':
Fix google-explicit-constructor warnings.
Change-Id: Idadc45b465a1d767154d2f0cb7412ce897cf1378
This commit is contained in:
@ -380,7 +380,7 @@ using namespace android;
|
||||
// on the caller already having a local JNI ref
|
||||
class LocalScopedBitmap {
|
||||
public:
|
||||
LocalScopedBitmap(jlong bitmapHandle)
|
||||
explicit LocalScopedBitmap(jlong bitmapHandle)
|
||||
: mBitmap(reinterpret_cast<Bitmap*>(bitmapHandle)) {}
|
||||
|
||||
Bitmap* operator->() {
|
||||
|
@ -50,7 +50,7 @@ static const bool kDebugGlyphs = false;
|
||||
// calls. See the Harfbuzz source for references about what these callbacks do.
|
||||
|
||||
struct HarfBuzzFontData {
|
||||
HarfBuzzFontData(SkPaint* paint) : m_paint(paint) { }
|
||||
explicit HarfBuzzFontData(SkPaint* paint) : m_paint(paint) { }
|
||||
SkPaint* m_paint;
|
||||
};
|
||||
|
||||
|
@ -268,7 +268,7 @@ struct RgnIterPair {
|
||||
SkRegion fRgn; // a copy of the caller's region
|
||||
SkRegion::Iterator fIter; // an iterator acting upon the copy (fRgn)
|
||||
|
||||
RgnIterPair(const SkRegion& rgn) : fRgn(rgn) {
|
||||
explicit RgnIterPair(const SkRegion& rgn) : fRgn(rgn) {
|
||||
// have our iterator reference our copy (fRgn), so we know it will be
|
||||
// unchanged for the lifetime of the iterator
|
||||
fIter.reset(fRgn);
|
||||
|
@ -114,7 +114,7 @@ class PerfMeasurementContext {
|
||||
* will be active at once, which is a function of the GPU's level of
|
||||
* pipelining and the frequency of queries.
|
||||
*/
|
||||
PerfMeasurementContext(size_t maxQueryCount):
|
||||
explicit PerfMeasurementContext(size_t maxQueryCount):
|
||||
mTimingStartIndex(0),
|
||||
mTimingEndIndex(0),
|
||||
mTimingQueryIndex(0) {
|
||||
|
@ -1059,7 +1059,7 @@ static void android_content_AssetManager_dumpTheme(JNIEnv* env, jobject clazz,
|
||||
|
||||
class XmlAttributeFinder : public BackTrackingAttributeFinder<XmlAttributeFinder, jsize> {
|
||||
public:
|
||||
XmlAttributeFinder(const ResXMLParser* parser)
|
||||
explicit XmlAttributeFinder(const ResXMLParser* parser)
|
||||
: BackTrackingAttributeFinder(0, parser != NULL ? parser->getAttributeCount() : 0)
|
||||
, mParser(parser) {}
|
||||
|
||||
|
@ -88,7 +88,7 @@ static struct {
|
||||
|
||||
class GraphicBufferWrapper {
|
||||
public:
|
||||
GraphicBufferWrapper(const sp<GraphicBuffer>& buffer): buffer(buffer) {
|
||||
explicit GraphicBufferWrapper(const sp<GraphicBuffer>& buffer): buffer(buffer) {
|
||||
}
|
||||
|
||||
sp<GraphicBuffer> buffer;
|
||||
|
@ -43,7 +43,7 @@ static struct {
|
||||
|
||||
class NativeInputChannel {
|
||||
public:
|
||||
NativeInputChannel(const sp<InputChannel>& inputChannel);
|
||||
explicit NativeInputChannel(const sp<InputChannel>& inputChannel);
|
||||
~NativeInputChannel();
|
||||
|
||||
inline sp<InputChannel> getInputChannel() { return mInputChannel; }
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
|
||||
class InvokeAnimationListeners : public MessageHandler {
|
||||
public:
|
||||
InvokeAnimationListeners(std::vector<OnFinishedEvent>& events) {
|
||||
explicit InvokeAnimationListeners(std::vector<OnFinishedEvent>& events) {
|
||||
mOnFinishedEvents.swap(events);
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ private:
|
||||
|
||||
class RootRenderNode : public RenderNode, ErrorHandler {
|
||||
public:
|
||||
RootRenderNode(JNIEnv* env) : RenderNode() {
|
||||
explicit RootRenderNode(JNIEnv* env) : RenderNode() {
|
||||
mLooper = Looper::getForThread();
|
||||
LOG_ALWAYS_FATAL_IF(!mLooper.get(),
|
||||
"Must create RootRenderNode on a thread with a looper!");
|
||||
@ -197,7 +197,7 @@ private:
|
||||
|
||||
class ContextFactoryImpl : public IContextFactory {
|
||||
public:
|
||||
ContextFactoryImpl(RootRenderNode* rootNode) : mRootNode(rootNode) {}
|
||||
explicit ContextFactoryImpl(RootRenderNode* rootNode) : mRootNode(rootNode) {}
|
||||
|
||||
virtual AnimationContext* createAnimationContext(renderthread::TimeLord& clock) {
|
||||
return new AnimationContextBridge(clock, mRootNode);
|
||||
|
@ -45,7 +45,7 @@ static struct {
|
||||
|
||||
class VelocityTrackerState {
|
||||
public:
|
||||
VelocityTrackerState(const char* strategy);
|
||||
explicit VelocityTrackerState(const char* strategy);
|
||||
|
||||
void clear();
|
||||
void addMovement(const MotionEvent* event);
|
||||
|
@ -3008,7 +3008,7 @@ String8 ResTable_config::toString() const {
|
||||
|
||||
struct ResTable::Header
|
||||
{
|
||||
Header(ResTable* _owner) : owner(_owner), ownedData(NULL), header(NULL),
|
||||
explicit Header(ResTable* _owner) : owner(_owner), ownedData(NULL), header(NULL),
|
||||
resourceIDMap(NULL), resourceIDMapSize(0) { }
|
||||
|
||||
~Header()
|
||||
|
@ -150,7 +150,7 @@ bail:
|
||||
|
||||
class FileReader {
|
||||
public:
|
||||
FileReader(FILE* fp) :
|
||||
explicit FileReader(FILE* fp) :
|
||||
mFp(fp), mReadBuf(new unsigned char[kReadBufSize])
|
||||
{
|
||||
}
|
||||
@ -170,7 +170,7 @@ public:
|
||||
|
||||
class FdReader {
|
||||
public:
|
||||
FdReader(int fd) :
|
||||
explicit FdReader(int fd) :
|
||||
mFd(fd), mReadBuf(new unsigned char[kReadBufSize])
|
||||
{
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ void AnimatorManager::endAllStagingAnimators() {
|
||||
|
||||
class EndActiveAnimatorsFunctor {
|
||||
public:
|
||||
EndActiveAnimatorsFunctor(AnimationContext& context) : mContext(context) {}
|
||||
explicit EndActiveAnimatorsFunctor(AnimationContext& context) : mContext(context) {}
|
||||
|
||||
void operator() (BaseRenderNodeAnimator* animator) {
|
||||
animator->forceEndNow(mContext);
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
|
||||
class DrawBatch : public Batch {
|
||||
public:
|
||||
DrawBatch(const DeferInfo& deferInfo) : mAllOpsOpaque(true),
|
||||
explicit DrawBatch(const DeferInfo& deferInfo) : mAllOpsOpaque(true),
|
||||
mBatchId(deferInfo.batchId), mMergeId(deferInfo.mergeId) {
|
||||
mOps.clear();
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ SkiaCanvas::SkiaCanvas(const SkBitmap& bitmap) {
|
||||
|
||||
class ClipCopier : public SkCanvas::ClipVisitor {
|
||||
public:
|
||||
ClipCopier(SkCanvas* dstCanvas) : m_dstCanvas(dstCanvas) {}
|
||||
explicit ClipCopier(SkCanvas* dstCanvas) : m_dstCanvas(dstCanvas) {}
|
||||
|
||||
virtual void clipRect(const SkRect& rect, SkRegion::Op op, bool antialias) {
|
||||
m_dstCanvas->clipRect(rect, op, antialias);
|
||||
|
@ -110,7 +110,7 @@ public:
|
||||
|
||||
class TessellationCache::TessellationProcessor : public TaskProcessor<VertexBuffer*> {
|
||||
public:
|
||||
TessellationProcessor(Caches& caches)
|
||||
explicit TessellationProcessor(Caches& caches)
|
||||
: TaskProcessor<VertexBuffer*>(&caches.tasks) {}
|
||||
~TessellationProcessor() {}
|
||||
|
||||
@ -124,7 +124,7 @@ public:
|
||||
|
||||
class TessellationCache::Buffer {
|
||||
public:
|
||||
Buffer(const sp<Task<VertexBuffer*> >& task)
|
||||
explicit Buffer(const sp<Task<VertexBuffer*> >& task)
|
||||
: mTask(task)
|
||||
, mBuffer(nullptr) {
|
||||
}
|
||||
@ -283,7 +283,7 @@ static void tessellateShadows(
|
||||
|
||||
class ShadowProcessor : public TaskProcessor<TessellationCache::vertexBuffer_pair_t*> {
|
||||
public:
|
||||
ShadowProcessor(Caches& caches)
|
||||
explicit ShadowProcessor(Caches& caches)
|
||||
: TaskProcessor<TessellationCache::vertexBuffer_pair_t*>(&caches.tasks) {}
|
||||
~ShadowProcessor() {}
|
||||
|
||||
|
@ -186,7 +186,7 @@ void RenderState::assertOnGLThread() {
|
||||
|
||||
class DecStrongTask : public renderthread::RenderTask {
|
||||
public:
|
||||
DecStrongTask(VirtualLightRefBase* object) : mObject(object) {}
|
||||
explicit DecStrongTask(VirtualLightRefBase* object) : mObject(object) {}
|
||||
|
||||
virtual void run() override {
|
||||
mObject->decStrong(nullptr);
|
||||
|
@ -129,7 +129,7 @@ class DispatchFrameCallbacks : public RenderTask {
|
||||
private:
|
||||
RenderThread* mRenderThread;
|
||||
public:
|
||||
DispatchFrameCallbacks(RenderThread* rt) : mRenderThread(rt) {}
|
||||
explicit DispatchFrameCallbacks(RenderThread* rt) : mRenderThread(rt) {}
|
||||
|
||||
virtual void run() override {
|
||||
mRenderThread->dispatchFrameCallbacks();
|
||||
|
@ -30,7 +30,7 @@ public:
|
||||
SignalingDtor() {
|
||||
mDestroyed = nullptr;
|
||||
}
|
||||
SignalingDtor(bool* destroyedSignal) {
|
||||
explicit SignalingDtor(bool* destroyedSignal) {
|
||||
mDestroyed = destroyedSignal;
|
||||
*mDestroyed = false;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ enum {
|
||||
class BpMountService: public BpInterface<IMountService>
|
||||
{
|
||||
public:
|
||||
BpMountService(const sp<IBinder>& impl)
|
||||
explicit BpMountService(const sp<IBinder>& impl)
|
||||
: BpInterface<IMountService>(impl)
|
||||
{
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ enum {
|
||||
// This is a stub that real consumers should override.
|
||||
class BpObbActionListener: public BpInterface<IObbActionListener> {
|
||||
public:
|
||||
BpObbActionListener(const sp<IBinder>& impl)
|
||||
explicit BpObbActionListener(const sp<IBinder>& impl)
|
||||
: BpInterface<IObbActionListener>(impl)
|
||||
{ }
|
||||
|
||||
|
@ -39,7 +39,7 @@ using android::Surface;
|
||||
|
||||
class NativeWindowHandle : public WindowHandle {
|
||||
public:
|
||||
NativeWindowHandle(ANativeWindow* window) : window_(window) {
|
||||
explicit NativeWindowHandle(ANativeWindow* window) : window_(window) {
|
||||
}
|
||||
|
||||
virtual ~NativeWindowHandle() {
|
||||
|
@ -39,7 +39,7 @@ struct AAssetDir {
|
||||
size_t mCurFileIndex;
|
||||
String8 mCachedFileName;
|
||||
|
||||
AAssetDir(AssetDir* dir) : mAssetDir(dir), mCurFileIndex(0) { }
|
||||
explicit AAssetDir(AssetDir* dir) : mAssetDir(dir), mCurFileIndex(0) { }
|
||||
~AAssetDir() { delete mAssetDir; }
|
||||
};
|
||||
|
||||
@ -48,7 +48,7 @@ struct AAssetDir {
|
||||
struct AAsset {
|
||||
Asset* mAsset;
|
||||
|
||||
AAsset(Asset* asset) : mAsset(asset) { }
|
||||
explicit AAsset(Asset* asset) : mAsset(asset) { }
|
||||
~AAsset() { delete mAsset; }
|
||||
};
|
||||
|
||||
|
@ -64,7 +64,7 @@ protected:
|
||||
virtual ~Choreographer() = default;
|
||||
|
||||
private:
|
||||
Choreographer(const sp<Looper>& looper);
|
||||
explicit Choreographer(const sp<Looper>& looper);
|
||||
Choreographer(const Choreographer&) = delete;
|
||||
|
||||
virtual void dispatchVsync(nsecs_t timestamp, int32_t id, uint32_t count);
|
||||
|
@ -37,7 +37,7 @@ private:
|
||||
sp<AStorageManager> mStorageManager;
|
||||
|
||||
public:
|
||||
ObbActionListener(AStorageManager* mgr) :
|
||||
explicit ObbActionListener(AStorageManager* mgr) :
|
||||
mStorageManager(mgr)
|
||||
{}
|
||||
|
||||
|
@ -74,7 +74,7 @@ protected:
|
||||
class AlarmImplAlarmDriver : public AlarmImpl
|
||||
{
|
||||
public:
|
||||
AlarmImplAlarmDriver(int fd) : AlarmImpl(&fd, 1) { }
|
||||
explicit AlarmImplAlarmDriver(int fd) : AlarmImpl(&fd, 1) { }
|
||||
|
||||
int set(int type, struct timespec *ts);
|
||||
int setTime(struct timeval *tv);
|
||||
|
@ -84,7 +84,7 @@ private:
|
||||
// it to service thread.
|
||||
class CecEventWrapper : public LightRefBase<CecEventWrapper> {
|
||||
public:
|
||||
CecEventWrapper(const hdmi_event_t& event) {
|
||||
explicit CecEventWrapper(const hdmi_event_t& event) {
|
||||
// Copy message.
|
||||
switch (event.type) {
|
||||
case HDMI_EVENT_CEC_MESSAGE:
|
||||
|
@ -28,7 +28,7 @@ namespace aapt {
|
||||
struct TestValue : public Value {
|
||||
std::u16string value;
|
||||
|
||||
TestValue(StringPiece16 str) : value(str.toString()) {
|
||||
explicit TestValue(StringPiece16 str) : value(str.toString()) {
|
||||
}
|
||||
|
||||
TestValue* clone(StringPool* /*newPool*/) const override {
|
||||
|
Reference in New Issue
Block a user