From 9dc2a9e09b30ab61bbe84259e344892cf86169bd Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 23 Sep 2014 22:01:09 -0400 Subject: [PATCH] Bug 1071571 - Fix more bad implicit constructors in DOM; r=baku --HG-- extra : rebase_source : 76a5802984faf0b63d9b86ab325428a397b0d27d --- dom/canvas/WebGLSampler.h | 2 +- dom/canvas/WebGLStrongTypes.h | 7 ++++--- dom/canvas/WebGLSync.h | 2 +- dom/canvas/WebGLTransformFeedback.h | 2 +- dom/mobileconnection/ipc/MobileConnectionChild.h | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dom/canvas/WebGLSampler.h b/dom/canvas/WebGLSampler.h index d3d6a9b37f2..f87c4728f8d 100644 --- a/dom/canvas/WebGLSampler.h +++ b/dom/canvas/WebGLSampler.h @@ -26,7 +26,7 @@ class WebGLSampler MOZ_FINAL public: - WebGLSampler(WebGLContext* context); + explicit WebGLSampler(WebGLContext* aContext); void Delete(); WebGLContext* GetParentObject() const; diff --git a/dom/canvas/WebGLStrongTypes.h b/dom/canvas/WebGLStrongTypes.h index 0ca7c8227c2..775f2e875f9 100644 --- a/dom/canvas/WebGLStrongTypes.h +++ b/dom/canvas/WebGLStrongTypes.h @@ -8,8 +8,9 @@ #define WEBGLSTRONGTYPES_H_ #include "GLDefs.h" -#include "mozilla/Assertions.h" #include "mozilla/ArrayUtils.h" +#include "mozilla/Assertions.h" +#include "mozilla/Attributes.h" // Usage: // =========== @@ -132,8 +133,8 @@ public: AssertOnceThatEnumValuesAreSorted(); } - StrongGLenum(GLenum val) - : mValue(val) + MOZ_IMPLICIT StrongGLenum(GLenum aVal) + : mValue(aVal) { AssertOnceThatEnumValuesAreSorted(); MOZ_ASSERT(IsValueLegal(mValue)); diff --git a/dom/canvas/WebGLSync.h b/dom/canvas/WebGLSync.h index 3204646f67a..54b41faf852 100644 --- a/dom/canvas/WebGLSync.h +++ b/dom/canvas/WebGLSync.h @@ -24,7 +24,7 @@ class WebGLSync MOZ_FINAL public: - WebGLSync(WebGLContext* context); + explicit WebGLSync(WebGLContext* aContext); void Delete(); WebGLContext* GetParentObject() const; diff --git a/dom/canvas/WebGLTransformFeedback.h b/dom/canvas/WebGLTransformFeedback.h index 17467c56875..302df01dd92 100644 --- a/dom/canvas/WebGLTransformFeedback.h +++ b/dom/canvas/WebGLTransformFeedback.h @@ -26,7 +26,7 @@ class WebGLTransformFeedback MOZ_FINAL public: - WebGLTransformFeedback(WebGLContext* context); + explicit WebGLTransformFeedback(WebGLContext* aContext); void Delete(); WebGLContext* GetParentObject() const; diff --git a/dom/mobileconnection/ipc/MobileConnectionChild.h b/dom/mobileconnection/ipc/MobileConnectionChild.h index e31fc2662a5..062c4810651 100644 --- a/dom/mobileconnection/ipc/MobileConnectionChild.h +++ b/dom/mobileconnection/ipc/MobileConnectionChild.h @@ -32,7 +32,7 @@ public: NS_DECL_ISUPPORTS NS_DECL_NSIMOBILECONNECTION - MobileConnectionChild(uint32_t aServiceId); + explicit MobileConnectionChild(uint32_t aServiceId); void Init();