The documentation's example for Comparator is buggy #34

Closed
cmumford opened this Issue Sep 9, 2014 · 3 comments

Comments

Projects
None yet
1 participant
@cmumford
Contributor

cmumford commented Sep 9, 2014

Original issue 28 created by amirhkiani on 2011-08-10T07:37:42.000Z:

Hey!

I tried following the documentation for creating comparators and the line:

virtual const char* Name() { return "TwoPartComparator"; }

is wrong. It has to be:

virtual const char* Name() const { return "TwoPartComparator"; }

instead (with a const after Name()).

Thinking the documentation is perfect, I spent a long time trying to figure out what was wrong and figured at the end that the code was wrong to begin with. It's minor but I guess it would help fixing it.

Many thanks for open sourcing leveldb!
Amir

@cmumford

This comment has been minimized.

Show comment
Hide comment
@cmumford

cmumford Sep 9, 2014

Contributor

Comment #1 originally posted by gabor@google.com on 2011-08-10T21:10:33.000Z:

Thanks Amir!

Contributor

cmumford commented Sep 9, 2014

Comment #1 originally posted by gabor@google.com on 2011-08-10T21:10:33.000Z:

Thanks Amir!

@cmumford

This comment has been minimized.

Show comment
Hide comment
@cmumford

cmumford Sep 9, 2014

Contributor

Comment #2 originally posted by gabor@google.com on 2011-08-16T01:46:21.000Z:

This is fixed in r42. Please verify.

Contributor

cmumford commented Sep 9, 2014

Comment #2 originally posted by gabor@google.com on 2011-08-16T01:46:21.000Z:

This is fixed in r42. Please verify.

@cmumford

This comment has been minimized.

Show comment
Hide comment
@cmumford

cmumford Sep 9, 2014

Contributor

Comment #3 originally posted by amirhkiani on 2011-08-16T01:50:46.000Z:

LGTM

Contributor

cmumford commented Sep 9, 2014

Comment #3 originally posted by amirhkiani on 2011-08-16T01:50:46.000Z:

LGTM

@cmumford cmumford closed this Sep 9, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment