1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-10 03:53:21 +02:00
cdt/core
Andrew Eidsness 8883fb1af5 Bug 402177: Btree.insert returns wrong value
The javadoc for BTree.insert says "don't insert if the key was already
there, in which case we return the record that matched".

However, the implementation was returning the new record even when it
was not actually inserted.

This is a fix for the problem and a test case to demonstrate the issue.

Further Changes:
----------------
I have modified the code style as described in the comments in
https://git.eclipse.org/r/#/c/10804.

However, I'm still not sure what style is expected.  I've looked through
the CDT wiki a few times, especially the 'new developer' parts, but
haven't found anything relevant.  When I asked the question a few weeks
ago, the only reply was to use the "eclipse built-in style", which I
can't find in my preferences.  The default seems to be "K&R Style" (that
is what it is set to now, and I don't think that I would have changed
it), so that is what I've used here.

If I've missed the section in the wiki then a pointer would be greatly
appreciated.  Otherwise this topic would be a great topic for someone
that knows the answers to add to the wiki.

Change-Id: If079f235871fcdfbd35f1cba3f64cc3e33edaaec
Reviewed-on: https://git.eclipse.org/r/10804
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2013-03-12 12:24:05 -04:00
..
org.eclipse.cdt.alltests
org.eclipse.cdt.core Bug 402177: Btree.insert returns wrong value 2013-03-12 12:24:05 -04:00
org.eclipse.cdt.core.aix Bug 393455 - Terminal sessions broken on AIX 2013-01-15 10:35:06 -05:00
org.eclipse.cdt.core.linux
org.eclipse.cdt.core.linux.ia64
org.eclipse.cdt.core.linux.ppc
org.eclipse.cdt.core.linux.ppc64
org.eclipse.cdt.core.linux.x86
org.eclipse.cdt.core.linux.x86_64
org.eclipse.cdt.core.macosx
org.eclipse.cdt.core.qnx
org.eclipse.cdt.core.solaris
org.eclipse.cdt.core.tests Bug 402177: Btree.insert returns wrong value 2013-03-12 12:24:05 -04:00
org.eclipse.cdt.core.win32
org.eclipse.cdt.core.win32.x86
org.eclipse.cdt.core.win32.x86_64
org.eclipse.cdt.ui Bug 393883 - Implement Method loses throw() 2013-03-11 15:44:53 -04:00
org.eclipse.cdt.ui.tests Bug 393883 - Implement Method loses throw() 2013-03-11 15:44:53 -04:00