Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d1f02d7 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Follow raw pointer and sp<> conventions

Unconditional delete for raw pointers.
Use "if (sp != 0)" not "if (sp.get() != 0)" or "if (sp != NULL)".
Use "if (raw != NULL)" not "if (raw)".

Change-Id: I531a8da7c37149261ed2f34b862ec4896a4b785b
parent 0ba18ec1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -559,7 +559,7 @@ public:
        if (status != NO_ERROR) {
            return status;
        }
        if (numEffects) {
        if (numEffects != NULL) {
            *numEffects = (uint32_t)reply.readInt32();
        }
        return NO_ERROR;
+3 −5
Original line number Diff line number Diff line
@@ -246,14 +246,12 @@ int JetPlayer::render() {
    }//while (1)

threadExit:
    if (mAudioTrack) {
    if (mAudioTrack != NULL) {
        mAudioTrack->stop();
        mAudioTrack->flush();
    }
    if (mAudioBuffer) {
    delete [] mAudioBuffer;
    mAudioBuffer = NULL;
    }
    mMutex.lock();
    mTid = -1;
    mCondition.signal();
+1 −1
Original line number Diff line number Diff line
@@ -1045,7 +1045,7 @@ bool ToneGenerator::initAudioTrack() {
initAudioTrack_exit:

    // Cleanup
    if (mpAudioTrack) {
    if (mpAudioTrack != NULL) {
        ALOGV("Delete Track I: %p", mpAudioTrack);
        delete mpAudioTrack;
        mpAudioTrack = NULL;
+2 −2
Original line number Diff line number Diff line
@@ -588,10 +588,10 @@ status_t AudioPolicyService::dump(int fd, const Vector<String16>& args)
        }

        dumpInternals(fd);
        if (mAudioCommandThread != NULL) {
        if (mAudioCommandThread != 0) {
            mAudioCommandThread->dump(fd);
        }
        if (mTonePlaybackThread != NULL) {
        if (mTonePlaybackThread != 0) {
            mTonePlaybackThread->dump(fd);
        }