fix(core): Updates slice with range selectors (#583)
- [X] Replaces Span slicing with range selection - [X] Replaces string slicing with range selection
This commit is contained in:
parent
9f9d990f85
commit
a0893b68c0
62 changed files with 363 additions and 382 deletions
|
|
@ -5792,7 +5792,7 @@ namespace Server
|
|||
|
||||
if (length != regBuffer.Length)
|
||||
{
|
||||
regBuffer = regBuffer.SliceToLength(length); // Adjust to the actual size
|
||||
regBuffer = regBuffer[..length]; // Adjust to the actual size
|
||||
}
|
||||
|
||||
heard.OnSpeech(regArgs);
|
||||
|
|
@ -5806,7 +5806,7 @@ namespace Server
|
|||
|
||||
if (length != mutBuffer.Length)
|
||||
{
|
||||
mutBuffer = mutBuffer.SliceToLength(length); // Adjust to the actual size
|
||||
mutBuffer = mutBuffer[..length]; // Adjust to the actual size
|
||||
}
|
||||
|
||||
heard.OnSpeech(mutatedArgs);
|
||||
|
|
@ -9155,7 +9155,7 @@ namespace Server
|
|||
|
||||
if (length != buffer.Length)
|
||||
{
|
||||
buffer = buffer.SliceToLength(length); // Adjust to the actual size
|
||||
buffer = buffer[..length]; // Adjust to the actual size
|
||||
}
|
||||
|
||||
state.Send(buffer);
|
||||
|
|
@ -9186,7 +9186,7 @@ namespace Server
|
|||
|
||||
if (length != buffer.Length)
|
||||
{
|
||||
buffer = buffer.SliceToLength(length); // Adjust to the actual size
|
||||
buffer = buffer[..length]; // Adjust to the actual size
|
||||
}
|
||||
|
||||
state.Send(buffer);
|
||||
|
|
@ -9220,7 +9220,7 @@ namespace Server
|
|||
|
||||
if (length != buffer.Length)
|
||||
{
|
||||
buffer = buffer.SliceToLength(length); // Adjust to the actual size
|
||||
buffer = buffer[..length]; // Adjust to the actual size
|
||||
}
|
||||
|
||||
state.Send(buffer);
|
||||
|
|
@ -9268,7 +9268,7 @@ namespace Server
|
|||
|
||||
if (length != buffer.Length)
|
||||
{
|
||||
buffer = buffer.SliceToLength(length); // Adjust to the actual size
|
||||
buffer = buffer[..length]; // Adjust to the actual size
|
||||
}
|
||||
|
||||
state.Send(buffer);
|
||||
|
|
@ -9299,7 +9299,7 @@ namespace Server
|
|||
|
||||
if (length != buffer.Length)
|
||||
{
|
||||
buffer = buffer.SliceToLength(length); // Adjust to the actual size
|
||||
buffer = buffer[..length]; // Adjust to the actual size
|
||||
}
|
||||
|
||||
state.Send(buffer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue