Codechange: Use null pointer literal instead of the NULL macro
This commit is contained in:

committed by
Michael Lutz

parent
3b4f224c0b
commit
7c8e7c6b6e
@@ -301,7 +301,7 @@ void LinkGraphOverlay::DrawStationDots(const DrawPixelInfo *dpi) const
|
||||
{
|
||||
for (StationSupplyList::const_iterator i(this->cached_stations.begin()); i != this->cached_stations.end(); ++i) {
|
||||
const Station *st = Station::GetIfValid(i->first);
|
||||
if (st == NULL) continue;
|
||||
if (st == nullptr) continue;
|
||||
Point pt = this->GetStationMiddle(st);
|
||||
if (!this->IsPointVisible(pt, dpi, 3 * this->scale)) continue;
|
||||
|
||||
@@ -345,7 +345,7 @@ void LinkGraphOverlay::DrawStationDots(const DrawPixelInfo *dpi) const
|
||||
*/
|
||||
Point LinkGraphOverlay::GetStationMiddle(const Station *st) const
|
||||
{
|
||||
if (this->window->viewport != NULL) {
|
||||
if (this->window->viewport != nullptr) {
|
||||
return GetViewportStationMiddle(this->window->viewport, st);
|
||||
} else {
|
||||
/* assume this is a smallmap */
|
||||
@@ -399,7 +399,7 @@ NWidgetBase *MakeCargoesLegendLinkGraphGUI(int *biggest_index)
|
||||
{
|
||||
static const uint ENTRIES_PER_ROW = CeilDiv(NUM_CARGO, 5);
|
||||
NWidgetVertical *panel = new NWidgetVertical(NC_EQUALSIZE);
|
||||
NWidgetHorizontal *row = NULL;
|
||||
NWidgetHorizontal *row = nullptr;
|
||||
for (uint i = 0; i < NUM_CARGO; ++i) {
|
||||
if (i % ENTRIES_PER_ROW == 0) {
|
||||
if (row) panel->Add(row);
|
||||
@@ -563,7 +563,7 @@ bool LinkGraphLegendWindow::OnTooltip(Point pt, int widget, TooltipCloseConditio
|
||||
{
|
||||
if (IsInsideMM(widget, WID_LGL_COMPANY_FIRST, WID_LGL_COMPANY_LAST + 1)) {
|
||||
if (this->IsWidgetDisabled(widget)) {
|
||||
GuiShowTooltips(this, STR_LINKGRAPH_LEGEND_SELECT_COMPANIES, 0, NULL, close_cond);
|
||||
GuiShowTooltips(this, STR_LINKGRAPH_LEGEND_SELECT_COMPANIES, 0, nullptr, close_cond);
|
||||
} else {
|
||||
uint64 params[2];
|
||||
CompanyID cid = (CompanyID)(widget - WID_LGL_COMPANY_FIRST);
|
||||
|
Reference in New Issue
Block a user