File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -190,7 +190,10 @@ public:
190190 foreach (ref state; _states)
191191 {
192192 T current = state.random;
193- if (current) return push(current), current;
193+ if (current) {
194+ push(current);
195+ return current;
196+ }
194197 }
195198
196199 return null ;
@@ -265,7 +268,10 @@ public:
265268 foreach (ref state; _states.values .sort! " a.size > b.size" )
266269 {
267270 T current = state.select(_history[$ - state.size .. $]);
268- if (current) return push(current), current;
271+ if (current) {
272+ push(current);
273+ return current;
274+ }
269275 }
270276 }
271277
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ private:
3535 /+ +
3636 + Returns the hash for a token.
3737 ++/
38- hash_t toHash () const
38+ hash_t toHash () const nothrow @safe
3939 {
4040 static if (__traits(compiles, {
4141 T key = void ;
@@ -46,7 +46,7 @@ private:
4646 }
4747 else
4848 {
49- return hashOf ( _key);
49+ return typeid (T).getHash(& _key);
5050 }
5151 }
5252
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public:
2828 {
2929 JSONValue states = chain.states.map! (s => encodeState(s)).array;
3030
31- return toJSON (& states, _pretty);
31+ return toJSON (states, _pretty);
3232 }
3333
3434private :
You can’t perform that action at this time.
0 commit comments