Ignore:
Timestamp:
Feb 26, 2013, 2:43:45 PM (7 years ago)
Author:
sam
Message:

base: start removing occurrences of NULL on our long journey to nullptr.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ticker.cpp

    r2444 r2506  
    4040    {
    4141        for (int i = 0; i < Entity::ALLGROUP_END; i++)
    42             list[i] = NULL;
     42            list[i] = nullptr;
    4343    }
    4444
     
    115115void Ticker::Ref(Entity *entity)
    116116{
    117     ASSERT(entity, "dereferencing NULL entity\n");
     117    ASSERT(entity, "dereferencing nullptr entity\n");
    118118    ASSERT(!entity->m_destroy,
    119119           "referencing entity scheduled for destruction %s\n",
     
    125125         * very fast since the first entry in autolist is the last
    126126         * registered entity. */
    127         for (Entity *e = data->autolist, *prev = NULL; e;
     127        for (Entity *e = data->autolist, *prev = nullptr; e;
    128128             prev = e, e = e->m_autonext)
    129129        {
     
    142142int Ticker::Unref(Entity *entity)
    143143{
    144     ASSERT(entity, "dereferencing NULL entity\n");
     144    ASSERT(entity, "dereferencing null entity\n");
    145145    ASSERT(entity->m_ref > 0, "dereferencing unreferenced entity %s\n",
    146146           entity->GetName())
     
    248248         * inthe tick lists can be marked for destruction. */
    249249        for (int i = 0; i < Entity::ALLGROUP_END; i++)
    250             for (Entity *e = data->list[i], *prev = NULL; e; )
     250            for (Entity *e = data->list[i], *prev = nullptr; e; )
    251251            {
    252252                if (e->m_destroy && i < Entity::GAMEGROUP_END)
     
    322322#endif
    323323
    324     return NULL;
     324    return nullptr;
    325325}
    326326
     
    336336    }
    337337
    338     return NULL;
     338    return nullptr;
    339339}
    340340
     
    344344    data->disktick.Pop();
    345345
    346     return NULL;
     346    return nullptr;
    347347}
    348348
     
    362362    data->fps = fps;
    363363
    364     data->gamethread = new Thread(TickerData::GameThreadMain, NULL);
     364    data->gamethread = new Thread(TickerData::GameThreadMain, nullptr);
    365365    data->gametick.Push(1);
    366366
    367     data->diskthread = new Thread(TickerData::DiskThreadMain, NULL);
     367    data->diskthread = new Thread(TickerData::DiskThreadMain, nullptr);
    368368}
    369369
Note: See TracChangeset for help on using the changeset viewer.