Bug 1243198 - Use rvalue references for JS::ubi::ByFilename constructor; r=jimb

This change makes it a bit more clear that ByFilename is taking ownership of the
given arguments.
This commit is contained in:
Nick Fitzgerald 2016-01-26 15:09:00 +01:00
Родитель f506ded619
Коммит 84b55a74af
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -773,7 +773,7 @@ class ByFilename : public CountType {
CountTypePtr noFilenameType;
public:
ByFilename(CountTypePtr& thenType, CountTypePtr& noFilenameType)
ByFilename(CountTypePtr&& thenType, CountTypePtr&& noFilenameType)
: CountType(),
thenType(Move(thenType)),
noFilenameType(Move(noFilenameType))
@ -1037,7 +1037,7 @@ ParseBreakdown(JSContext* cx, HandleValue breakdownValue)
if (!noFilenameType)
return nullptr;
return CountTypePtr(js_new<ByFilename>(thenType, noFilenameType));
return CountTypePtr(js_new<ByFilename>(Move(thenType), Move(noFilenameType)));
}
// We didn't recognize the breakdown type; complain.