mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fixed String(StringView) ctor
This commit is contained in:
parent
05c2e1587c
commit
dfd443d68b
1 changed files with 2 additions and 2 deletions
|
@ -210,8 +210,8 @@ namespace System
|
|||
[AllowAppend]
|
||||
public this(StringView strView)
|
||||
{
|
||||
let tryBufferSize = strView.Length - sizeof(char8*);
|
||||
let bufferSize = (tryBufferSize >= 0) ? tryBufferSize : 0;
|
||||
let count = strView.Length;
|
||||
int bufferSize = (count == 0) ? 0 : (count - 1) & ~(sizeof(char8*) - 1);
|
||||
#unwarn
|
||||
char8* addlPtr = append char8[bufferSize]*(?);
|
||||
Init(bufferSize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue