What it does
Moves null pointer spelling to the modern, explicit form.
Rules
Small, reviewable rules for modern C++ cleanup.
Rule 01
Replaces legacy null pointer constants when Legacyless can confirm pointer intent.
Before
Connection* current = NULL;
if (current == 0) {
reconnect(current);
}
After
Connection* current = nullptr;
if (current == nullptr) {
reconnect(current);
}
What it does
Moves null pointer spelling to the modern, explicit form.
Why safe
Applied only when null pointer context is clear, not as a blind text replacement.
Rule 02
Adds override when a derived function is already overriding a virtual base declaration.
Before
struct Writer : BaseWriter {
void flush();
};
After
struct Writer : BaseWriter {
void flush() override;
};
What it does
Makes existing polymorphic intent explicit and easier to review.
Why safe
No new runtime behavior. It clarifies behavior the type system already has.