File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
ValveKeyValue/ValveKeyValue/Deserialization Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public KVTokenReader(TextReader textReader)
1111
1212 protected TextReader textReader ;
1313 protected bool disposed ;
14- protected int ? peekedNext ;
14+ int peekedNext = - 1 ;
1515
1616 int lineOffset ;
1717 int columnOffset ;
@@ -40,10 +40,10 @@ protected bool TryGetNext(out char next)
4040 {
4141 int nextValue ;
4242
43- if ( peekedNext . HasValue )
43+ if ( peekedNext != - 1 )
4444 {
45- nextValue = peekedNext . Value ;
46- peekedNext = null ;
45+ nextValue = peekedNext ;
46+ peekedNext = - 1 ;
4747 }
4848 else
4949 {
@@ -72,9 +72,9 @@ protected bool TryGetNext(out char next)
7272
7373 protected int Peek ( )
7474 {
75- if ( peekedNext . HasValue )
75+ if ( peekedNext != - 1 )
7676 {
77- return peekedNext . Value ;
77+ return peekedNext ;
7878 }
7979
8080 var next = textReader . Read ( ) ;
You can’t perform that action at this time.
0 commit comments