Closed Bug 1577700 Opened 3 months ago Closed 3 months ago

Add a function for obtaining a Span of char from a Span of uint8_t

Categories

(Core :: MFBT, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: hsivonen, Assigned: hsivonen)

Details

Attachments

(1 file, 1 obsolete file)

Bytes in C++ are a mess, and very often there's a need to cast between char and uint8_t. We have AsBytes that views any Span as a Span of uint8_t. Let's add AsChars that takes a Span of uint8_t and returns a Span of char.

Attachment #9089314 - Attachment is obsolete: true
Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fe25291a6919
Add a function for obtaining a Span of char from a Span of uint8_t. r=froydnj
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.