mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 738740 - Fix handling of parameters in nsTArray::ReplaceElementAt. r=bz
Handle the parameters given to ReplaceElementAt the same way as those given to other methods in the class. This allows removal of the & in GLContext.cpp that was taking the address of a temporary, and causing a build error when using clang, or when using GCC with particular parameters.
This commit is contained in:
parent
d14fc6c435
commit
aa2bb6dae0
@ -1185,7 +1185,7 @@ void TiledTextureImage::Resize(const nsIntSize& aSize)
|
||||
nsRefPtr<TextureImage> teximg =
|
||||
mGL->TileGenFunc(size, mContentType, mUseNearestFilter);
|
||||
if (replace)
|
||||
mImages.ReplaceElementAt(i, &teximg.forget());
|
||||
mImages.ReplaceElementAt(i, teximg.forget());
|
||||
else
|
||||
mImages.InsertElementAt(i, teximg.forget());
|
||||
i++;
|
||||
|
@ -754,7 +754,7 @@ public:
|
||||
// A variation on the ReplaceElementsAt method defined above.
|
||||
template<class Item>
|
||||
elem_type *ReplaceElementAt(index_type index, const Item& item) {
|
||||
return ReplaceElementsAt(index, 1, item, 1);
|
||||
return ReplaceElementsAt(index, 1, &item, 1);
|
||||
}
|
||||
|
||||
// A variation on the ReplaceElementsAt method defined above.
|
||||
|
Loading…
Reference in New Issue
Block a user