mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-15 06:44:10 +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]
|
[AllowAppend]
|
||||||
public this(StringView strView)
|
public this(StringView strView)
|
||||||
{
|
{
|
||||||
let tryBufferSize = strView.Length - sizeof(char8*);
|
let count = strView.Length;
|
||||||
let bufferSize = (tryBufferSize >= 0) ? tryBufferSize : 0;
|
int bufferSize = (count == 0) ? 0 : (count - 1) & ~(sizeof(char8*) - 1);
|
||||||
#unwarn
|
#unwarn
|
||||||
char8* addlPtr = append char8[bufferSize]*(?);
|
char8* addlPtr = append char8[bufferSize]*(?);
|
||||||
Init(bufferSize);
|
Init(bufferSize);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue