diff options
| author | Steven Moreland <smoreland@google.com> | 2021-04-05 20:36:34 +0000 |
|---|---|---|
| committer | Steven Moreland <smoreland@google.com> | 2021-04-07 20:30:21 +0000 |
| commit | fb5bdae5032b5952691305c6cd4a5597f8dc12ce (patch) | |
| tree | 5376fc2abbd1387f30437bc23bbd88358fb5bc96 /libutils/Unicode.cpp | |
| parent | 8ce56b25ed9a42726394be880a1fcb11912649e2 (diff) | |
libutils: add sp::cast method
Previously, sp::sp(T*) internally had a static cast, and people
frequently wrote code like this:
sp<A> a = ...;
sp<B> b(a.get()); // implicit static cast
Luckily, none of the other sp constructors have this implicit cast. So,
for explicit code, rather than making those use static_cast internally,
adding an sp::cast function.
Bug: 184190315
Test: use in libbinder
Change-Id: Id205c88d03e16cf85ccb8f493ce88b4bbc65a688
Diffstat (limited to 'libutils/Unicode.cpp')
0 files changed, 0 insertions, 0 deletions
