diff options
| author | Chris Wailes <chriswailes@google.com> | 2014-08-12 13:51:10 -0700 |
|---|---|---|
| committer | Stephen Hines <srhines@google.com> | 2014-08-20 18:14:27 -0700 |
| commit | 44bef6fba6244292b751387f3d6c31cca96c28ad (patch) | |
| tree | a9dd48535a1f3343315bc75f7751cf042c05dc67 /rsProgram.cpp | |
| parent | 4bb773ef75eeff5960852b733bcca5834020ee9e (diff) | |
| download | android_frameworks_rs-44bef6fba6244292b751387f3d6c31cca96c28ad.tar.gz android_frameworks_rs-44bef6fba6244292b751387f3d6c31cca96c28ad.tar.bz2 android_frameworks_rs-44bef6fba6244292b751387f3d6c31cca96c28ad.zip | |
Replace NULL macros with nullptr literals.
Change-Id: I918c40879aa547438f77e7d1a95fa2aa33bec398
Diffstat (limited to 'rsProgram.cpp')
| -rw-r--r-- | rsProgram.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/rsProgram.cpp b/rsProgram.cpp index d5cb3442..5b24c0d7 100644 --- a/rsProgram.cpp +++ b/rsProgram.cpp @@ -103,21 +103,21 @@ Program::~Program() { mHal.state.constantsCount = 0; mHal.state.texturesCount = 0; - if (mUserShader != NULL) { + if (mUserShader != nullptr) { delete[] mUserShader; - mUserShader = NULL; + mUserShader = nullptr; } mUserShaderLen = 0; } bool Program::freeChildren() { for (uint32_t ct=0; ct < mHal.state.constantsCount; ct++) { - bindAllocation(NULL, NULL, ct); + bindAllocation(nullptr, nullptr, ct); } for (uint32_t ct=0; ct < mHal.state.texturesCount; ct++) { - bindTexture(NULL, ct, NULL); - bindSampler(NULL, ct, NULL); + bindTexture(nullptr, ct, nullptr); + bindSampler(nullptr, ct, nullptr); } return false; } @@ -125,32 +125,32 @@ bool Program::freeChildren() { void Program::initMemberVars() { mDirty = true; - mHal.drv = NULL; - mHal.state.textures = NULL; - mHal.state.samplers = NULL; - mHal.state.textureTargets = NULL; - mHal.state.inputElements = NULL; - mHal.state.constantTypes = NULL; - mHal.state.constants = NULL; + mHal.drv = nullptr; + mHal.state.textures = nullptr; + mHal.state.samplers = nullptr; + mHal.state.textureTargets = nullptr; + mHal.state.inputElements = nullptr; + mHal.state.constantTypes = nullptr; + mHal.state.constants = nullptr; mHal.state.inputElementsCount = 0; mHal.state.constantsCount = 0; mHal.state.texturesCount = 0; - mTextures = NULL; - mSamplers = NULL; - mInputElements = NULL; - mConstantTypes = NULL; - mConstants = NULL; + mTextures = nullptr; + mSamplers = nullptr; + mInputElements = nullptr; + mConstantTypes = nullptr; + mConstants = nullptr; mIsInternal = false; - mUserShader = NULL; + mUserShader = nullptr; mUserShaderLen = 0; } void Program::bindAllocation(Context *rsc, Allocation *alloc, uint32_t slot) { - if (alloc != NULL) { + if (alloc != nullptr) { if (slot >= mHal.state.constantsCount) { ALOGE("Attempt to bind alloc at slot %u, on shader id %" PRIuPTR ", but const count is %u", slot, (uintptr_t)this, mHal.state.constantsCount); |
