Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 6, 2015, 10:54:34 PM (9 years ago)
Author:
landauf
Message:

replace '0' by 'nullptr'

Location:
code/branches/cpp11_v2/test
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/test/core/command/CommandTest.cc

    r10765 r10768  
    129129                ModifyConsoleCommand("test").popObject();
    130130            else if (a == 1)
    131                 ModifyConsoleCommand("test").setFunction(FunctorPtr(0));
     131                ModifyConsoleCommand("test").setFunction(FunctorPtr(nullptr));
    132132            else if (a == -1)
    133133                ModifyConsoleCommand("test").popFunction();
  • code/branches/cpp11_v2/test/core/object/StrongPtrTest.cc

    r10765 r10768  
    112112    {
    113113        EXPECT_TRUE(strongPtr == nullptr);
    114         EXPECT_TRUE(strongPtr == 0);
     114        EXPECT_TRUE(strongPtr == nullptr);
    115115        EXPECT_TRUE(!strongPtr);
    116116        EXPECT_FALSE(strongPtr != nullptr);
    117         EXPECT_FALSE(strongPtr != 0);
     117        EXPECT_FALSE(strongPtr != nullptr);
    118118        EXPECT_FALSE(strongPtr);
    119119    }
     
    135135        }
    136136        {
    137             StrongPtr<DestroyableTest> strongPtr = 0;
     137            StrongPtr<DestroyableTest> strongPtr = nullptr;
    138138            isNull(strongPtr);
    139139        }
    140140        {
    141141            StrongPtr<DestroyableTest> strongPtr;
    142             strongPtr = 0;
     142            strongPtr = nullptr;
    143143            isNull(strongPtr);
    144144        }
     
    151151        StrongPtr<DestroyableTest> strongPtr = test;
    152152        EXPECT_FALSE(strongPtr == nullptr);
    153         EXPECT_FALSE(strongPtr == 0);
     153        EXPECT_FALSE(strongPtr == nullptr);
    154154        EXPECT_FALSE(!strongPtr);
    155155        EXPECT_TRUE(strongPtr != nullptr);
    156         EXPECT_TRUE(strongPtr != 0);
     156        EXPECT_TRUE(strongPtr != nullptr);
    157157        EXPECT_TRUE(strongPtr);
    158158        test->destroy();
  • code/branches/cpp11_v2/test/core/object/WeakPtrTest.cc

    r10765 r10768  
    6767    {
    6868        EXPECT_TRUE(weakPtr == nullptr);
    69         EXPECT_TRUE(weakPtr == 0);
     69        EXPECT_TRUE(weakPtr == nullptr);
    7070        EXPECT_TRUE(!weakPtr);
    7171        EXPECT_FALSE(weakPtr != nullptr);
    72         EXPECT_FALSE(weakPtr != 0);
     72        EXPECT_FALSE(weakPtr != nullptr);
    7373        EXPECT_FALSE(weakPtr);
    7474    }
     
    9090        }
    9191        {
    92             WeakPtr<DestroyableTest> weakPtr = 0;
     92            WeakPtr<DestroyableTest> weakPtr = nullptr;
    9393            isNull(weakPtr);
    9494        }
    9595        {
    9696            WeakPtr<DestroyableTest> weakPtr;
    97             weakPtr = 0;
     97            weakPtr = nullptr;
    9898            isNull(weakPtr);
    9999        }
     
    105105        WeakPtr<DestroyableTest> weakPtr = test;
    106106        EXPECT_FALSE(weakPtr == nullptr);
    107         EXPECT_FALSE(weakPtr == 0);
     107        EXPECT_FALSE(weakPtr == nullptr);
    108108        EXPECT_FALSE(!weakPtr);
    109109        EXPECT_TRUE(weakPtr != nullptr);
    110         EXPECT_TRUE(weakPtr != 0);
     110        EXPECT_TRUE(weakPtr != nullptr);
    111111        EXPECT_TRUE(weakPtr);
    112112        test->destroy();
  • code/branches/cpp11_v2/test/util/SharedPtrTest.cc

    r10765 r10768  
    4141    {
    4242        SharedPtr<TestClass> test;
    43         EXPECT_EQ(0, test.get());
     43        EXPECT_EQ(nullptr, test.get());
    4444    }
    4545
     
    9191
    9292        SharedPtr<TestClass> test;
    93         EXPECT_EQ(0, test.get());
     93        EXPECT_EQ(nullptr, test.get());
    9494
    9595        test = other;
     
    105105
    106106        SharedPtr<TestClass> test;
    107         EXPECT_EQ(0, test.get());
     107        EXPECT_EQ(nullptr, test.get());
    108108
    109109        test = other;
     
    138138    {
    139139        SharedPtr<TestClass> test;
    140         EXPECT_EQ(0, test.get());
     140        EXPECT_EQ(nullptr, test.get());
    141141        EXPECT_FALSE(test);
    142142
  • code/branches/cpp11_v2/test/util/SmallObjectAllocatorTest.cc

    r9114 r10768  
    4747        // create an integer
    4848        size_t* pointer = this->create(5);
    49         ASSERT_NE((void*)0, pointer);
     49        ASSERT_NE((void*)nullptr, pointer);
    5050        EXPECT_EQ(5u, *pointer);
    5151    }
     
    5555        // create an integer
    5656        size_t* pointer = this->create(5);
    57         ASSERT_NE((void*)0, pointer);
     57        ASSERT_NE((void*)nullptr, pointer);
    5858        EXPECT_EQ(5u, *pointer);
    5959
     
    228228        // create an object
    229229        SmallObject* pointer = this->create(5);
    230         ASSERT_NE((void*)0, pointer);
     230        ASSERT_NE((void*)nullptr, pointer);
    231231        EXPECT_EQ(5u, pointer->getValue());
    232232        EXPECT_EQ(5u, SmallObject::total_s);
     
    239239        // create an object
    240240        SmallObject* pointer = this->create(5);
    241         ASSERT_NE((void*)0, pointer);
     241        ASSERT_NE((void*)nullptr, pointer);
    242242        EXPECT_EQ(5u, pointer->getValue());
    243243        EXPECT_EQ(5u, SmallObject::total_s);
Note: See TracChangeset for help on using the changeset viewer.