Le 01/02/2016 23:38, Nathan Froyd a écrit :
> We're working on moving all of our platforms to use a C++11-ish
> standard library.  For std::unique_ptr, at least, the best tack is to
> write a small polyfill based on mfbt/UniquePtr.h.  (It's not clear to
> me how your suggestion with std::vector applies here.)  If our
> UniquePtr isn't a drop-in replacement for std::unique_ptr, that's
> worthy of a bug report.
>
> -Nathan
Yes, Lee Salzman gave me such a suggestion (thanks btw).

Regarding my suggestion of std::vector: One file in the WOFF2 library is
implementing the optimization of OpenType tables and has to manipulate
list of points. In previous version this was done using
std::vector<Point>. For some reason, in the latest upstream version it
is now done via a std::unique_ptr<Point[]>. So what I've done is just to
go back to the previous implementation. Of course, this only applies to
this particular case and is not a general replacement for std::unique_ptr

Using UniquePtr or a polyfill base on UniquePtr will probably gives a
result closer the author's intention. But at the end we will still have
to patch the woff2 library in some way...

-- 
Frédéric Wang


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to