Skip to content

Commit 8193e0d

Browse files
committed
Replace opIn_r with opBinaryRight.
1 parent e61503c commit 8193e0d

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

engine/source/dmdscript/RandAA.d

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ struct aard (K, V, bool useRandom = false)
8080
assert(0);
8181
}
8282

83-
V* opIn_r(K k)
83+
84+
V* opBinaryRight(string op : "in")(K k)
8485
{
8586
if(imp_ is null)
8687
return null;
@@ -153,7 +154,7 @@ struct aard (K, V, bool useRandom = false)
153154

154155
V get(K k)
155156
{
156-
V* p = opIn_r(k);
157+
V* p = k in this;
157158
if(p !is null)
158159
{
159160
return *p;
@@ -165,7 +166,7 @@ struct aard (K, V, bool useRandom = false)
165166
{
166167
if(imp_ !is null)
167168
{
168-
V* p = opIn_r(k);
169+
V* p = k in this;
169170
if(p !is null)
170171
{
171172
val = *p;
@@ -728,7 +729,7 @@ public:
728729
}
729730
}
730731
/**Returns null if index is not found.*/
731-
V* opIn_r(K index)
732+
V* opBinaryRight(string op : "in")(K index)
732733
{
733734
size_t i = findExisting(index);
734735
if(i == size_t.max)

0 commit comments

Comments
 (0)