mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Fixed incorrectly spelled List<>.GrowUninitialized
This commit is contained in:
parent
04e67007dd
commit
073d55d339
6 changed files with 14 additions and 11 deletions
|
@ -99,7 +99,7 @@ namespace Beefy.theme.dark
|
|||
mLineCoordJumpTable = new .();
|
||||
|
||||
mLineCoords.Clear();
|
||||
mLineCoords.GrowUnitialized(mData.mLineStarts.Count);
|
||||
mLineCoords.GrowUninitialized(mData.mLineStarts.Count);
|
||||
mLineCoordJumpTable.Clear();
|
||||
|
||||
float fontHeight = mFont.GetLineSpacing();
|
||||
|
|
|
@ -1479,7 +1479,7 @@ namespace Beefy.widgets
|
|||
}
|
||||
|
||||
mData.mLineStarts = new List<int32>();
|
||||
mData.mLineStarts.GrowUnitialized(lineIdx + 2);
|
||||
mData.mLineStarts.GrowUninitialized(lineIdx + 2);
|
||||
int32* lineStartsPtr = mData.mLineStarts.Ptr;
|
||||
lineStartsPtr[0] = 0;
|
||||
|
||||
|
|
|
@ -177,7 +177,7 @@ namespace System.Collections
|
|||
else
|
||||
{
|
||||
int addSize = value - mSize;
|
||||
Internal.MemSet(GrowUnitialized(addSize), 0, addSize * strideof(T));
|
||||
Internal.MemSet(GrowUninitialized(addSize), 0, addSize * strideof(T));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -434,7 +434,7 @@ namespace System.Collections
|
|||
}
|
||||
|
||||
/// Returns a pointer to the start of the added uninitialized section
|
||||
public T* GrowUnitialized(int addSize)
|
||||
public T* GrowUninitialized(int addSize)
|
||||
{
|
||||
if (mSize + addSize > AllocSize) EnsureCapacity(mSize + addSize, true);
|
||||
mSize += (int_cosize)addSize;
|
||||
|
@ -446,6 +446,9 @@ namespace System.Collections
|
|||
return &mItems[mSize - addSize];
|
||||
}
|
||||
|
||||
[Obsolete("Method replaced by GrowUninitialized due to misspelling")]
|
||||
public T* GrowUnitialized(int addSize) => GrowUninitialized(addSize);
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
if (mSize > 0)
|
||||
|
|
|
@ -152,7 +152,7 @@ namespace System
|
|||
char16* encodedData = scope char16[allocSize]*;
|
||||
int encodedLen = UTF16.Encode(key, encodedData, allocSize);
|
||||
int byteLen = encodedLen * 2;
|
||||
Internal.MemCpy(data.GrowUnitialized(byteLen), encodedData, byteLen);
|
||||
Internal.MemCpy(data.GrowUninitialized(byteLen), encodedData, byteLen);
|
||||
|
||||
data.Add((uint8)'='); data.Add((uint8)0);
|
||||
|
||||
|
@ -161,7 +161,7 @@ namespace System
|
|||
encodedData = scope char16[allocSize]*;
|
||||
encodedLen = UTF16.Encode(value, encodedData, allocSize);
|
||||
byteLen = encodedLen * 2;
|
||||
Internal.MemCpy(data.GrowUnitialized(byteLen), encodedData, byteLen);
|
||||
Internal.MemCpy(data.GrowUninitialized(byteLen), encodedData, byteLen);
|
||||
|
||||
data.Add(0); data.Add(0); // Single UTF16 char
|
||||
}
|
||||
|
@ -187,13 +187,13 @@ namespace System
|
|||
for (var key in keys)
|
||||
{
|
||||
int byteLen = key.Length;
|
||||
Internal.MemCpy(data.GrowUnitialized(byteLen), key.Ptr, byteLen);
|
||||
Internal.MemCpy(data.GrowUninitialized(byteLen), key.Ptr, byteLen);
|
||||
|
||||
data.Add('=');
|
||||
|
||||
let value = values[@key];
|
||||
byteLen = value.Length;
|
||||
Internal.MemCpy(data.GrowUnitialized(byteLen), value.Ptr, byteLen);
|
||||
Internal.MemCpy(data.GrowUninitialized(byteLen), value.Ptr, byteLen);
|
||||
|
||||
data.Add(0);
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ namespace System.IO
|
|||
return .Ok(0);
|
||||
int growSize = mPosition + count - mData.Count;
|
||||
if (growSize > 0)
|
||||
mData.GrowUnitialized(growSize);
|
||||
mData.GrowUninitialized(growSize);
|
||||
Internal.MemCpy(&mData[mPosition], data.Ptr, count);
|
||||
mPosition += count;
|
||||
return .Ok(count);
|
||||
|
@ -204,7 +204,7 @@ namespace System.IO
|
|||
let count = data.Length;
|
||||
if (count == 0)
|
||||
return .Ok(0);
|
||||
Internal.MemCpy(mData.GrowUnitialized(count), data.Ptr, count);
|
||||
Internal.MemCpy(mData.GrowUninitialized(count), data.Ptr, count);
|
||||
return .Ok(count);
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace System.IO
|
|||
return .Ok(0);
|
||||
int growSize = mPosition + count - mMemory.Count;
|
||||
if (growSize > 0)
|
||||
mMemory.GrowUnitialized(growSize);
|
||||
mMemory.GrowUninitialized(growSize);
|
||||
Internal.MemCpy(&mMemory[mPosition], data.Ptr, count);
|
||||
mPosition += count;
|
||||
return .Ok(count);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue