File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -967,6 +967,8 @@ class GameRep : public std::enable_shared_from_this<GameRep> {
967967 virtual void BuildComputedValues () const {}
968968};
969969
970+ #include < assert.h>
971+
970972class GameRep ::Infosets {
971973public:
972974 class iterator {
@@ -993,10 +995,29 @@ class GameRep::Infosets {
993995
994996 value_type operator *() const
995997 {
998+ assert (inner_ != inner_end_);
999+ assert (*inner_);
1000+ assert ((*inner_)->IsValid ());
1001+ assert ((*inner_)->m_game != nullptr );
1002+ assert ((*inner_)->m_player != nullptr );
1003+
1004+ auto g = (*inner_)->GetGame ();
1005+ assert (g); // i.e. g != nullptr
9961006 return GameInfoset (*inner_); // GameObjectPtr constructor
9971007 }
9981008
999- value_type operator ->() const { return GameInfoset (*inner_); }
1009+ value_type operator ->() const
1010+ {
1011+ assert (inner_ != inner_end_);
1012+ assert (*inner_);
1013+ assert ((*inner_)->IsValid ());
1014+ assert ((*inner_)->m_game != nullptr );
1015+ assert ((*inner_)->m_player != nullptr );
1016+
1017+ auto g = (*inner_)->GetGame ();
1018+ assert (g); // i.e. g != nullptrreturn
1019+ return GameInfoset (*inner_);
1020+ }
10001021
10011022 iterator &operator ++()
10021023 {
You can’t perform that action at this time.
0 commit comments