simple refactoring

This commit is contained in:
Mikhail 2024-06-24 22:06:20 +08:00
parent 469eea16bb
commit 120b19d036
6 changed files with 6 additions and 29 deletions

View File

@ -7,11 +7,12 @@ namespace DCFApixels.DragonECS
internal unsafe static class EcsMetaAttributeHalper internal unsafe static class EcsMetaAttributeHalper
{ {
internal const string EMPTY_NO_SENSE_MESSAGE = "With empty parameters, this attribute makes no sense.";
[ThreadStatic] [ThreadStatic]
private static string[] _splitBuffer; private static string[] _splitBuffer;
public static string[] Split(char separator, string value) public static string[] Split(char separator, string value)
{ {
if(_splitBuffer == null) if (_splitBuffer == null)
{ {
_splitBuffer = new string[128]; _splitBuffer = new string[128];
} }
@ -24,7 +25,7 @@ namespace DCFApixels.DragonECS
{ {
if (reader.current != null) if (reader.current != null)
{ {
if(_splitBuffer.Length == bufferIndex) if (_splitBuffer.Length == bufferIndex)
{ {
Array.Resize(ref _splitBuffer, _splitBuffer.Length << 1); Array.Resize(ref _splitBuffer, _splitBuffer.Length << 1);
} }

View File

@ -12,7 +12,7 @@ namespace DCFApixels.DragonECS
public const char SEPARATOR = '/'; public const char SEPARATOR = '/';
public readonly MetaGroup Data; public readonly MetaGroup Data;
[Obsolete("With empty parameters, this attribute makes no sense.")] [Obsolete(EcsMetaAttributeHalper.EMPTY_NO_SENSE_MESSAGE)]
public MetaGroupAttribute() { } public MetaGroupAttribute() { }
public MetaGroupAttribute(string name) public MetaGroupAttribute(string name)
{ {

View File

@ -13,7 +13,7 @@ namespace DCFApixels.DragonECS
get { return _tags; } get { return _tags; }
} }
[Obsolete("With empty parameters, this attribute makes no sense.")] [Obsolete(EcsMetaAttributeHalper.EMPTY_NO_SENSE_MESSAGE)]
public MetaTagsAttribute() { } public MetaTagsAttribute() { }
public MetaTagsAttribute(string tags) public MetaTagsAttribute(string tags)
{ {

View File

@ -1,5 +1,4 @@
using DCFApixels.DragonECS.Internal; using DCFApixels.DragonECS.Internal;
using DCFApixels.DragonECS.RunnersCore;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;

View File

@ -1,12 +0,0 @@
using System;
namespace DCFApixels.DragonECS.DI.Internal
{
internal class Throw
{
public static void ArgumentNull()
{
throw new ArgumentNullException();
}
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 790577d4144473d448401799f01ddf50
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: