New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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.

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.

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.

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