Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 4, 2015, 10:25:42 PM (9 years ago)
Author:
landauf
Message:

replace 'NULL' by 'nullptr'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/test/core/object/StrongPtrTest.cc

    r10744 r10765  
    111111    void isNull(const StrongPtr<DestroyableTest> strongPtr)
    112112    {
    113         EXPECT_TRUE(strongPtr == NULL);
     113        EXPECT_TRUE(strongPtr == nullptr);
    114114        EXPECT_TRUE(strongPtr == 0);
    115115        EXPECT_TRUE(!strongPtr);
    116         EXPECT_FALSE(strongPtr != NULL);
     116        EXPECT_FALSE(strongPtr != nullptr);
    117117        EXPECT_FALSE(strongPtr != 0);
    118118        EXPECT_FALSE(strongPtr);
     
    126126        }
    127127        {
    128             StrongPtr<DestroyableTest> strongPtr = NULL;
     128            StrongPtr<DestroyableTest> strongPtr = nullptr;
    129129            isNull(strongPtr);
    130130        }
    131131        {
    132132            StrongPtr<DestroyableTest> strongPtr;
    133             strongPtr = NULL;
     133            strongPtr = nullptr;
    134134            isNull(strongPtr);
    135135        }
     
    150150        DestroyableTest* test = new DestroyableTest(destroyed);
    151151        StrongPtr<DestroyableTest> strongPtr = test;
    152         EXPECT_FALSE(strongPtr == NULL);
     152        EXPECT_FALSE(strongPtr == nullptr);
    153153        EXPECT_FALSE(strongPtr == 0);
    154154        EXPECT_FALSE(!strongPtr);
    155         EXPECT_TRUE(strongPtr != NULL);
     155        EXPECT_TRUE(strongPtr != nullptr);
    156156        EXPECT_TRUE(strongPtr != 0);
    157157        EXPECT_TRUE(strongPtr);
     
    166166        // default
    167167        StrongPtr<DestroyableTest> strongPtr1;
    168         EXPECT_EQ(NULL, strongPtr1.get());
     168        EXPECT_EQ(nullptr, strongPtr1.get());
    169169
    170170        // pointer
     
    277277        EXPECT_EQ(1u, test->getReferenceCount());
    278278        strongPtr.reset();
    279         EXPECT_EQ(NULL, strongPtr.get());
     279        EXPECT_EQ(nullptr, strongPtr.get());
    280280        EXPECT_EQ(0u, test->getReferenceCount());
    281281
Note: See TracChangeset for help on using the changeset viewer.