-fully working betterC for windows

*replaced array[..] = array[ .. ] sclice copy with mempcy
 *added own std library (allocator, alloca, Mutex)
 *changed tamplates for collecting components for systems
-fixed issue with multiple optional components registering for system
This commit is contained in:
Mergul 2019-10-10 20:56:44 +02:00
parent ed99807871
commit 41f1c6474b
14 changed files with 722 additions and 868 deletions

View file

@ -30,6 +30,7 @@ export ulong hashInt(ulong x) nothrow @nogc @safe {
struct HashMap(KeyPar, ValuePar, alias hashFunc = defaultHashFunc) {
alias Key = KeyPar;
alias Value = ValuePar;
nothrow:
enum rehashFactor = 0.75;
enum size_t getIndexEmptyValue = size_t.max;
@ -262,7 +263,7 @@ struct HashMap(KeyPar, ValuePar, alias hashFunc = defaultHashFunc) {
return result;
}
export int byKey(scope int delegate(Key k) dg) {
export int byKey(scope int delegate(Key k) nothrow dg) {
int result;
foreach (ref Key k; this) {
result = dg(k);
@ -272,7 +273,7 @@ struct HashMap(KeyPar, ValuePar, alias hashFunc = defaultHashFunc) {
return result;
}
export int byValue(scope int delegate(ref Value k) dg) {
export int byValue(scope int delegate(ref Value k) nothrow dg) {
int result;
foreach (ref Value v; this) {
result = dg(v);
@ -282,7 +283,7 @@ struct HashMap(KeyPar, ValuePar, alias hashFunc = defaultHashFunc) {
return result;
}
export int byKeyValue(scope int delegate(ref Key k, ref Value v) dg) {
export int byKeyValue(scope int delegate(ref Key k, ref Value v) nothrow dg) {
int result;
foreach (ref Key k, ref Value v; this) {
result = dg(k, v);