diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 05:43:18 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 05:43:18 -0400 |
commit | 516fd67d506b8dd3c2721dfd1aa1bbef4a2eda6f (patch) | |
tree | aea649009c0ef563041ded0cb0c5d397568eab07 /editor/libeditor/TypeInState.cpp | |
parent | 17f7e1c8c6fca351174bdbd73981aa8e44d0f9da (diff) | |
download | UXP-516fd67d506b8dd3c2721dfd1aa1bbef4a2eda6f.tar UXP-516fd67d506b8dd3c2721dfd1aa1bbef4a2eda6f.tar.gz UXP-516fd67d506b8dd3c2721dfd1aa1bbef4a2eda6f.tar.lz UXP-516fd67d506b8dd3c2721dfd1aa1bbef4a2eda6f.tar.xz UXP-516fd67d506b8dd3c2721dfd1aa1bbef4a2eda6f.zip |
Bug 1337698 - Use UniquePtr instead of nsAutoPtr in editor
* PlaceholderTransaction should use UniquePtr
* HTMLEditor should use UniquePtr
* TypeInState should use UniquePtr
Tag #1375
Diffstat (limited to 'editor/libeditor/TypeInState.cpp')
-rw-r--r-- | editor/libeditor/TypeInState.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/libeditor/TypeInState.cpp b/editor/libeditor/TypeInState.cpp index ce43e5e4d..840139fee 100644 --- a/editor/libeditor/TypeInState.cpp +++ b/editor/libeditor/TypeInState.cpp @@ -193,7 +193,7 @@ TypeInState::ClearProp(nsIAtom* aProp, * TakeClearProperty() hands back next property item on the clear list. * Caller assumes ownership of PropItem and must delete it. */ -PropItem* +UniquePtr<PropItem> TypeInState::TakeClearProperty() { size_t count = mClearedArray.Length(); @@ -204,14 +204,14 @@ TypeInState::TakeClearProperty() --count; // indices are zero based PropItem* propItem = mClearedArray[count]; mClearedArray.RemoveElementAt(count); - return propItem; + return UniquePtr<PropItem>(propItem); } /** * TakeSetProperty() hands back next poroperty item on the set list. * Caller assumes ownership of PropItem and must delete it. */ -PropItem* +UniquePtr<PropItem> TypeInState::TakeSetProperty() { size_t count = mSetArray.Length(); @@ -221,7 +221,7 @@ TypeInState::TakeSetProperty() count--; // indices are zero based PropItem* propItem = mSetArray[count]; mSetArray.RemoveElementAt(count); - return propItem; + return UniquePtr<PropItem>(propItem); } /** |