diff options
author | Glenn Kasten <gkasten@google.com> | 2012-07-18 16:49:32 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-07-20 12:27:12 -0700 |
commit | cd2d61016527bf48bd2e9a920bb3fdbb875eb3e4 (patch) | |
tree | 17db61cdcaeda8479f9f523c7689727a5b979470 /services | |
parent | a08412711b3266d336134b16a45e98baa8d11b9d (diff) | |
download | frameworks_av-cd2d61016527bf48bd2e9a920bb3fdbb875eb3e4.zip frameworks_av-cd2d61016527bf48bd2e9a920bb3fdbb875eb3e4.tar.gz frameworks_av-cd2d61016527bf48bd2e9a920bb3fdbb875eb3e4.tar.bz2 |
Use constructor to initialize instead of memcpy
Also don't check for thread parameter as it's always non-NULL
Change-Id: Id23ded1370556ef3f76f81f5f0c6fa644bcba681
Diffstat (limited to 'services')
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index f714cab..0730492 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -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); |