equal
deleted
inserted
replaced
414 } |
414 } |
415 else |
415 else |
416 { |
416 { |
417 *(TInt*)iValue = value; |
417 *(TInt*)iValue = value; |
418 } |
418 } |
|
419 delete aString; // Because the command class knows nothing about how enums are converted from HBufCs in this case, it cannot be responsible for deleting the HBufC like it would be for a normal string argument. So we delete it here. |
419 iIsSet = ETrue; |
420 iIsSet = ETrue; |
420 } |
421 } |
421 else // string |
422 else // string |
422 { |
423 { |
423 if (iValueType & KValueTypeFlagMultiple) |
424 if (iValueType & KValueTypeFlagMultiple) |
2390 break; |
2391 break; |
2391 } |
2392 } |
2392 case KValueTypeEnum: |
2393 case KValueTypeEnum: |
2393 { |
2394 { |
2394 HBufC* string = ReadStringLC(aLex, EDisallowLeadingHyphen); |
2395 HBufC* string = ReadStringLC(aLex, EDisallowLeadingHyphen); |
2395 aValue.SetValueL(string); |
2396 aValue.SetValueL(string); |
2396 CleanupStack::PopAndDestroy(string); |
2397 CleanupStack::Pop(string); // SetValueL takes ownership |
2397 break; |
2398 break; |
2398 } |
2399 } |
2399 default: |
2400 default: |
2400 { |
2401 { |
2401 __ASSERT_ALWAYS(EFalse, Panic(EInvalidCommandOptionType)); |
2402 __ASSERT_ALWAYS(EFalse, Panic(EInvalidCommandOptionType)); |