Bug 1061050 - Fix more bad implicit constructors in editor; r=roc
--- a/editor/composer/nsComposerCommands.h
+++ b/editor/composer/nsComposerCommands.h
@@ -50,17 +50,17 @@ class _cmd : public nsBaseComposerComman
public: \
NS_DECL_NSICONTROLLERCOMMAND \
};
// virtual base class for commands that need to save and update Boolean state (like styles etc)
class nsBaseStateUpdatingCommand : public nsBaseComposerCommand
{
public:
- nsBaseStateUpdatingCommand(nsIAtom* aTagName);
+ explicit nsBaseStateUpdatingCommand(nsIAtom* aTagName);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSICONTROLLERCOMMAND
protected:
virtual ~nsBaseStateUpdatingCommand();
@@ -75,17 +75,17 @@ protected:
};
// Shared class for the various style updating commands like bold, italics etc.
// Suitable for commands whose state is either 'on' or 'off'.
class nsStyleUpdatingCommand : public nsBaseStateUpdatingCommand
{
public:
- nsStyleUpdatingCommand(nsIAtom* aTagName);
+ explicit nsStyleUpdatingCommand(nsIAtom* aTagName);
protected:
// get the current state (on or off) for this style or block format
virtual nsresult GetCurrentState(nsIEditor* aEditor, nsICommandParams* aParams);
// add/remove the style
virtual nsresult ToggleState(nsIEditor* aEditor);
@@ -106,31 +106,31 @@ protected:
nsIAtom* mTagName;
};
class nsListCommand : public nsBaseStateUpdatingCommand
{
public:
- nsListCommand(nsIAtom* aTagName);
+ explicit nsListCommand(nsIAtom* aTagName);
protected:
// get the current state (on or off) for this style or block format
virtual nsresult GetCurrentState(nsIEditor* aEditor, nsICommandParams* aParams);
// add/remove the style
virtual nsresult ToggleState(nsIEditor* aEditor);
};
class nsListItemCommand : public nsBaseStateUpdatingCommand
{
public:
- nsListItemCommand(nsIAtom* aTagName);
+ explicit nsListItemCommand(nsIAtom* aTagName);
protected:
// get the current state (on or off) for this style or block format
virtual nsresult GetCurrentState(nsIEditor* aEditor, nsICommandParams* aParams);
// add/remove the style
virtual nsresult ToggleState(nsIEditor* aEditor);
--- a/editor/composer/nsEditorSpellCheck.cpp
+++ b/editor/composer/nsEditorSpellCheck.cpp
@@ -45,17 +45,17 @@
#include "nsXULAppAPI.h" // for XRE_GetProcessType
using namespace mozilla;
class UpdateDictionnaryHolder {
private:
nsEditorSpellCheck* mSpellCheck;
public:
- UpdateDictionnaryHolder(nsEditorSpellCheck* esc): mSpellCheck(esc) {
+ explicit UpdateDictionnaryHolder(nsEditorSpellCheck* esc): mSpellCheck(esc) {
if (mSpellCheck) {
mSpellCheck->BeginUpdateDictionary();
}
}
~UpdateDictionnaryHolder() {
if (mSpellCheck) {
mSpellCheck->EndUpdateDictionary();
}
--- a/editor/txmgr/nsTransactionItem.h
+++ b/editor/txmgr/nsTransactionItem.h
@@ -20,17 +20,17 @@ class nsTransactionItem MOZ_FINAL
{
nsCOMArray<nsISupports> mData;
nsCOMPtr<nsITransaction> mTransaction;
nsTransactionStack *mUndoStack;
nsTransactionStack *mRedoStack;
public:
- nsTransactionItem(nsITransaction *aTransaction);
+ explicit nsTransactionItem(nsITransaction *aTransaction);
NS_METHOD_(MozExternalRefCountType) AddRef();
NS_METHOD_(MozExternalRefCountType) Release();
NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(nsTransactionItem)
virtual nsresult AddChild(nsTransactionItem *aTransactionItem);
already_AddRefed<nsITransaction> GetTransaction();
virtual nsresult GetIsBatch(bool *aIsBatch);