MCPcopy Create free account
hub / github.com/PenguLoader/PenguLoader / CefScopedStr

Class CefScopedStr

core/src/pengu.h:261–277  ·  view source on GitHub ↗

A wrapper of `cef_string_userfree_t` to auto-free. Do not free userfree pointer after passed to this struct.

Source from the content-addressed store, hash-verified

259/// Do not free userfree pointer after passed to this struct.
260///
261struct CefScopedStr : CefStrBase
262{
263 ///
264 /// @param uf CEF userfree string,
265 /// the `ptr()` method will return empty string when `uf` is null.
266 ///
267 CefScopedStr(cef_string_userfree_t uf);
268 ~CefScopedStr();
269
270 const cef_string_t *ptr() {
271 return str_;
272 }
273
274private:
275 // underlying pointer
276 cef_string_userfree_t str_;
277};
278
279/**
280 * CefString UTF-16 literal.

Calls

no outgoing calls

Tested by

no test coverage detected