rebnridgway 42a65c5160 Fix crash bug #8579 (#1238)
* Added declaration for deletePrevious function

* Added definition for deletePrevious function

* Fixed crash from deleteThis invalidating pointers

The crash was caused by deleteThis() invalidating the pointer to a constant variable usage.  This happened when a usage followed an assignment.  This fixes bug #8579.

* Added tokensFront to match tokensBack

This means deletePrevious can set the list's front if necessary.

* Initialised tokensFront in appropriate places

* Switched to using default Token constructor

* Switched to using Token default constructor

* Switched to using default constructor for Token

* Added missing argument to Token constructor

* Changed to use default constructor for Tokens

* Switched to using default constructor for Tokens

* Switched to using default constructor for Token

* Added new test for deleting front Token

Also made sure to use the correct constructor for Token in other tests.

* Syntax error

* Replaced tokensFront and tokensBack with a struct

This decreases the size of the Token class for performance purposes.

* Replaced tokensFront and tokensBack with a struct

* Added tokensFrontBack to destructor

* Reworked to use TokensBackFront struct

Also ran astyle.

* Reworked to use TokenList's TokensFrontBack member

* Reworked to use TokensFrontBack struct

* Reworked to use TokensFrontBack struct

* Reworked to work with TokensFrontBack struct

* Removed unnecessary scope operator

* Added missing parentheses

* Fixed syntax error

* Removed unnecessary constructor

* Default constructor now 0-initialises everything

This is safer for not using a temporary TokensFrontBack object, and doesn't use delegating constructors which aren't supported yet.

* Fixed unsafe null check

* Added missing explicit keyword

* Fixing stylistic nits

Removed default constructor as it has been superseded by the single-argument constructor with a default argument value.
Renamed listEnds to tokensFrontBack.
Fixed if statement that was supposed to be adding safety but would actually cause a crash if tokensFrontBack was null.

* Fixing stylistic nits

Removed default constructor and replaced it with a single-argument constructor with a default value.

* Fixing stylistic nits

Renamed _listEnds to _tokensFrontBack.

* Fixing stylistic nits

Renamed _listEnds to _tokensFrontBack.
2018-05-25 07:15:05 +02:00
..
2018-01-14 15:37:52 +01:00
2018-05-15 16:37:40 +02:00
2018-01-14 15:37:52 +01:00
2018-05-15 16:37:40 +02:00
2018-05-15 16:37:40 +02:00
2018-05-15 16:37:40 +02:00
2018-05-15 16:37:40 +02:00
2018-05-15 16:37:40 +02:00
2018-05-25 07:15:05 +02:00
2018-05-15 16:37:40 +02:00
2018-05-10 17:57:16 +02:00
2018-05-15 16:37:40 +02:00
2018-05-15 16:37:40 +02:00
2018-05-15 16:37:40 +02:00
2018-05-15 16:37:40 +02:00
2018-05-15 16:37:40 +02:00
2018-05-14 13:11:59 +02:00
2018-05-15 16:37:40 +02:00
2018-05-15 16:37:40 +02:00
2018-05-20 18:19:20 +02:00
2018-05-20 18:19:20 +02:00
2016-10-29 12:18:11 +02:00
2018-04-04 21:51:31 +02:00
2018-01-14 15:37:52 +01:00
2018-04-18 22:23:38 +02:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-03-31 20:59:09 +02:00
2018-03-31 20:59:09 +02:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-04-04 21:51:31 +02:00
2018-05-25 07:15:05 +02:00
2018-05-25 07:15:05 +02:00
2018-05-25 07:15:05 +02:00
2018-05-25 07:15:05 +02:00
2018-05-25 07:15:05 +02:00
2018-05-07 22:06:23 +02:00
2018-01-14 15:37:52 +01:00
2018-04-02 15:21:37 +02:00