[Kmymoney-devel] MyMoneyGncReader::convertSplit
Ian Neal
iann_bugzilla at blueyonder.co.uk
Wed May 26 08:46:00 CEST 2010
Alvaro Soliverez wrote:
> On Tue, May 25, 2010 at 11:30 PM, Jack<ostroffjh at users.sourceforge.net> wrote:
>> On 2010.05.25 19:00, Ian Neal wrote:
>>> I was going through the various files that the astyle-kmymoney.sh
>>> script changes and noticed that the above function seems to have an
>>> extra bracket/brace where it shouldn't - just before the line
>>> starting: "else { // not stock"
>>>
>>> Could someone who knows this code (or at least a second pair of eyes)
>>> confirm I'm not imagining things?
>> I certainly don't know the code, but just using emacs it looks like the
>> } immediately above that line matches the { on the switch line, the one
>> above that matches the one in "if (splitAccount.accountType() ==
>> MyMoneyAccount::Stock) {" and the one above that matches the one in "if
>> (!newPrice.isZero()) {". (I just delete the "}" and when I type it
>> back in, emacs bounces to the matching one. (the emacs function is
>> blink-matching-open)
>>
>> However - if the else (the one you quote) follows the if (immediately
>> after the case) then you are right - there does seem to be one extra }
>> in that set of three.
>>
It is due to the TRY, CATCH and PASS defines. TRY and PASS use an odd
number whereas CATCH uses an even number causing the mismatch. I would
suggest it is best they all use an even number and the code that uses it
adjusted. Does anyone know much about _GNCFILEANON ?
Regards,
Ian
More information about the KMyMoney-devel
mailing list