From 1eccfda3202317fe5082e9499b2128b29fbe59fc Mon Sep 17 00:00:00 2001 From: Mirko Brodesser Date: Thu, 22 Apr 2021 13:35:38 +0000 Subject: [PATCH] Bug 1706894: part 1) Use `std::move` in `DOMTextMapping`'s constructor. r=smaug More efficient. Differential Revision: https://phabricator.services.mozilla.com/D113079 --- extensions/spellcheck/src/mozInlineSpellWordUtil.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/spellcheck/src/mozInlineSpellWordUtil.h b/extensions/spellcheck/src/mozInlineSpellWordUtil.h index 074fe7f6388d..ee73b998be8a 100644 --- a/extensions/spellcheck/src/mozInlineSpellWordUtil.h +++ b/extensions/spellcheck/src/mozInlineSpellWordUtil.h @@ -6,6 +6,8 @@ #ifndef mozInlineSpellWordUtil_h #define mozInlineSpellWordUtil_h +#include + #include "mozilla/Attributes.h" #include "mozilla/Maybe.h" #include "mozilla/Result.h" @@ -129,7 +131,7 @@ class MOZ_STACK_CLASS mozInlineSpellWordUtil { DOMTextMapping(NodeOffset aNodeOffset, int32_t aSoftTextOffset, int32_t aLength) - : mNodeOffset(aNodeOffset), + : mNodeOffset(std::move(aNodeOffset)), mSoftTextOffset(aSoftTextOffset), mLength(aLength) {} }; -- 2.11.4.GIT