fixed warn and replace NULL with nullptr.
Merge pull request #7376 from joshuastray/v3

use CC_CONSTRUCTOR_ACCESS to replace protected/private
Merge pull request #7366 from Dhilan007/v3-fixed-warn

fixed warn and replace NULL with nullptr.