diff -r 7cee158cb8cd -r 26b2b12093af javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtinput.cpp --- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtinput.cpp Wed Sep 15 12:05:25 2010 +0300 +++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtinput.cpp Wed Oct 13 14:23:59 2010 +0300 @@ -24,10 +24,7 @@ // CSwtInput* CSwtInput::NewL(TSwtPeer aPeer, TInt aId) { - CSwtInput* self = new(ELeave) CSwtInput(aPeer); - CleanupStack::PushL(self); - self->ConstructL(aId); - CleanupStack::Pop(self); + CSwtInput* self = new(ELeave) CSwtInput(aPeer, aId); return self; } @@ -35,27 +32,21 @@ // CSwtInput::CSwtInput // --------------------------------------------------------------------------- // -CSwtInput::CSwtInput(TSwtPeer aPeer) +CSwtInput::CSwtInput(TSwtPeer aPeer, TInt aId) : iPeer(aPeer) - , iType(KErrNotFound) - , iLocation(KErrNotFound) { -} - -void CSwtInput::ConstructL(TInt aId) -{ + iType = KErrNotFound; + iLocation = KErrNotFound; RArray inputs; - CleanupClosePushL(inputs); - CSwtMobileDevice::GetHwInputsL(inputs); + CSwtMobileDevice::GetHwInputs(inputs); if (aId < inputs.Count()) { iType = inputs[aId].iType; iLocation = inputs[aId].iLocation; } - CleanupStack::PopAndDestroy(&inputs); + inputs.Close(); } - // --------------------------------------------------------------------------- // CSwtInput::~CSwtInput // ---------------------------------------------------------------------------