Small fixes
This commit is contained in:
parent
014e9cee8d
commit
24a07a05e5
13 changed files with 46 additions and 29 deletions
|
|
@ -1,4 +1,8 @@
|
|||
module bubel.ecs.hash_map;
|
||||
/************************************************************************************************************************
|
||||
Copyright: Copyright © 2018-2019, Dawid Masiukiewicz, Michał Masiukiewicz
|
||||
License: BSD 3-clause, see LICENSE file in project root folder.
|
||||
*/
|
||||
module bubel.ecs.hash_map;
|
||||
|
||||
import std.traits;
|
||||
|
||||
|
|
@ -332,36 +336,36 @@ nothrow:
|
|||
return result;
|
||||
}
|
||||
|
||||
export int byKey(scope int delegate(Key k) nothrow dg)
|
||||
export int byKey(scope int delegate(ref Key k) dg)
|
||||
{
|
||||
int result;
|
||||
foreach (ref Key k; this)
|
||||
{
|
||||
result = dg(k);
|
||||
result = (cast(int delegate(ref Key k) nothrow)dg)(k);
|
||||
if (result)
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
export int byValue(scope int delegate(ref Value k) nothrow dg)
|
||||
export int byValue(scope int delegate(ref Value v) dg)
|
||||
{
|
||||
int result;
|
||||
foreach (ref Value v; this)
|
||||
{
|
||||
result = dg(v);
|
||||
result = (cast(int delegate(ref Value v) nothrow)dg)(v);
|
||||
if (result)
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
export int byKeyValue(scope int delegate(ref Key k, ref Value v) nothrow dg)
|
||||
export int byKeyValue(scope int delegate(ref Key k, ref Value v) dg)
|
||||
{
|
||||
int result;
|
||||
foreach (ref Key k, ref Value v; this)
|
||||
{
|
||||
result = dg(k, v);
|
||||
result = (cast(int delegate(ref Key k, ref Value v) nothrow)dg)(k, v);
|
||||
if (result)
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue