From 66e1349be993e49db166c79169032c8324fd311d Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 2 Sep 2014 09:44:54 -0400 Subject: [PATCH] Bug 1061048 - Fix some bad impliciti constructors in profiler; r=BenWa --- tools/profiler/AutoObjectMapper.h | 2 +- tools/profiler/JSStreamWriter.h | 2 +- tools/profiler/ProfilerBacktrace.h | 2 +- tools/profiler/ProfilerMarkers.h | 4 ++-- tools/profiler/TableTicker.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/profiler/AutoObjectMapper.h b/tools/profiler/AutoObjectMapper.h index e1a3c4afbe1f..1f813d6f2824 100644 --- a/tools/profiler/AutoObjectMapper.h +++ b/tools/profiler/AutoObjectMapper.h @@ -23,7 +23,7 @@ public: // call Map() to attempt the mapping. There is no corresponding // Unmap() since the unmapping is done in the destructor. Failure // messages are sent to |aLog|. - AutoObjectMapperPOSIX(void(*aLog)(const char*)); + explicit AutoObjectMapperPOSIX(void(*aLog)(const char*)); // Unmap the file on destruction of this object. ~AutoObjectMapperPOSIX(); diff --git a/tools/profiler/JSStreamWriter.h b/tools/profiler/JSStreamWriter.h index 02bd79ff6f45..e55e2e15f78c 100644 --- a/tools/profiler/JSStreamWriter.h +++ b/tools/profiler/JSStreamWriter.h @@ -13,7 +13,7 @@ class JSStreamWriter { public: - JSStreamWriter(std::ostream& aStream); + explicit JSStreamWriter(std::ostream& aStream); ~JSStreamWriter(); void BeginObject(); diff --git a/tools/profiler/ProfilerBacktrace.h b/tools/profiler/ProfilerBacktrace.h index 9ae7d4dda410..209b81f3a84e 100644 --- a/tools/profiler/ProfilerBacktrace.h +++ b/tools/profiler/ProfilerBacktrace.h @@ -12,7 +12,7 @@ class SyncProfile; class ProfilerBacktrace { public: - ProfilerBacktrace(SyncProfile* aProfile); + explicit ProfilerBacktrace(SyncProfile* aProfile); ~ProfilerBacktrace(); void StreamJSObject(JSStreamWriter& b); diff --git a/tools/profiler/ProfilerMarkers.h b/tools/profiler/ProfilerMarkers.h index 7fcc6433032e..fc561e52c01d 100644 --- a/tools/profiler/ProfilerMarkers.h +++ b/tools/profiler/ProfilerMarkers.h @@ -28,7 +28,7 @@ public: /** * ProfilerMarkerPayload takes ownership of aStack */ - ProfilerMarkerPayload(ProfilerBacktrace* aStack = nullptr); + explicit ProfilerMarkerPayload(ProfilerBacktrace* aStack = nullptr); ProfilerMarkerPayload(const mozilla::TimeStamp& aStartTime, const mozilla::TimeStamp& aEndTime, ProfilerBacktrace* aStack = nullptr); @@ -91,7 +91,7 @@ private: class ProfilerMarkerImagePayload : public ProfilerMarkerPayload { public: - ProfilerMarkerImagePayload(gfxASurface *aImg); + explicit ProfilerMarkerImagePayload(gfxASurface *aImg); protected: virtual void diff --git a/tools/profiler/TableTicker.cpp b/tools/profiler/TableTicker.cpp index c14ddc0827ac..43b64a9cf873 100644 --- a/tools/profiler/TableTicker.cpp +++ b/tools/profiler/TableTicker.cpp @@ -184,7 +184,7 @@ JSObject* TableTicker::ToJSObject(JSContext *aCx) } struct SubprocessClosure { - SubprocessClosure(JSStreamWriter *aWriter) + explicit SubprocessClosure(JSStreamWriter *aWriter) : mWriter(aWriter) {}