Design #1257
C++14: use nullptr
Description
From C++11 there is the constant nullptr
for the null pointer.
Update our (C++) code to use it!
Related issues
History
#1 Updated by John Abbott over 5 years ago
- Related to Design #1225: Move to C++14 (skipping C++11) added
#2 Updated by John Abbott over 5 years ago
- Status changed from New to In Progress
- Assignee set to John Abbott
- % Done changed from 0 to 50
I have done the header files. There may still be one or zeroes which escaped me (but I hope not). Next are the .C files...
#3 Updated by John Abbott over 5 years ago
- Status changed from In Progress to Feedback
- % Done changed from 50 to 90
- Estimated time set to 2.70 h
I have now updated the .C files too. Everything compiles and runs.
It is possible that I have missed some 0 (that was not already commented as a "nullptr"), but I think I have changed almost all of them if not all.
#4 Updated by John Abbott over 4 years ago
- Target version changed from CoCoALib-0.99700 to CoCoALib-0.99650 November 2019
#5 Updated by John Abbott over 4 years ago
Ha ha! I did not change "nearly" all 0s into nullptr
that need to be changed.
I've just changed many more... it is an awful thankless task.
Probably a few have still escaped... but I don't care!
Will CVS in a while.
#6 Updated by John Abbott over 4 years ago
- Status changed from Feedback to Closed
- % Done changed from 90 to 100
- Estimated time changed from 2.70 h to 4.44 h
All tests pass, examples too. Even with debugging active.
Checked-in.
Closing. It is not worth devoting any more time to this (unless there is some fast automatic tool for detecting when 0 is used as nullptr
).
I was surprised to find a few places where 0 was used as false
(and 1 as true
).