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

Commit cd2d6101 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Use constructor to initialize instead of memcpy

Also don't check for thread parameter as it's always non-NULL

Change-Id: Id23ded1370556ef3f76f81f5f0c6fa644bcba681
parent a0841271
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -7940,7 +7940,7 @@ AudioFlinger::EffectModule::EffectModule(ThreadBase *thread,
                                        int sessionId)
    : mPinned(sessionId > AUDIO_SESSION_OUTPUT_MIX),
      mThread(thread), mChain(chain), mId(id), mSessionId(sessionId),
      // mDescriptor is set below
      mDescriptor(*desc),
      // mConfig is set by configure() and not used before then
      mEffectInterface(NULL),
      mStatus(NO_INIT), mState(IDLE),
@@ -7950,11 +7950,6 @@ AudioFlinger::EffectModule::EffectModule(ThreadBase *thread,
{
    ALOGV("Constructor %p", this);
    int lStatus;
    if (thread == NULL) {
        return;
    }

    memcpy(&mDescriptor, desc, sizeof(effect_descriptor_t));

    // create effect engine from effect factory
    mStatus = EffectCreate(&desc->uuid, sessionId, thread->id(), &mEffectInterface);