diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2017-11-05 07:41:19 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2017-11-05 08:16:27 +0100 |
| commit | e9d531366003fb2b7f6f340b566807eb0cd71bf1 (patch) | |
| tree | a0d2ed1cd250a119c69dcf29c3a15d03989ef015 /makefile.patch | |
| parent | 087bc506d25b20b759a092a7490942e9cb212720 (diff) | |
Simplify redundant 'is (not) None' tests
Menu node pointers and .choice in particular is always either an object
or None. Prompts are always either a (text, cond) tuple or None. Some
other things could (though unlikely) be empty strings, and some things
use symbolic constants that might be 0, so keep the None tests there.
Cleaner, especially for menu nodes.
Also remove redundant 'node2.dep is None' test. Expressions are never
None.
Also fix node.prompt == "" comparison in _flatten(). Should be
node.prompt[0] == "". Not sure why the C implementation checks for an
existing but empty prompt to begin with. It's just cosmetic menu stuff
at least.
Diffstat (limited to 'makefile.patch')
0 files changed, 0 insertions, 0 deletions
