Skip to content

Improving Code Readability : change variable's type #1004

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

Merged
merged 1 commit into from
Sep 16, 2019

Conversation

dota17
Copy link
Member

@dota17 dota17 commented Aug 16, 2019

No description provided.

@baylesj
Copy link
Contributor

baylesj commented Aug 26, 2019

Why do we have a Location typedef at all? Why not const Char everywhere?

@dota17
Copy link
Member Author

dota17 commented Aug 27, 2019

I think the Location typedef is expressed as "location" for the input json string/doc.
In my opinion, Location should be used for index, location, etc, and not for a string.
It doesn't mean that we should use const char everywhere.

Copy link
Contributor

@baylesj baylesj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still anti "Location," if it's an obfuscated typedef might as well just use auto, and if it isn't it's just additional cognitive work to mentally convert to char pointer.

I'm happy with this patch now, though.

@baylesj baylesj merged commit db61dba into open-source-parsers:master Sep 16, 2019
@dota17 dota17 deleted the dev-code branch September 17, 2019 03:12
dawesc pushed a commit to EFTlab/jsoncpp that referenced this pull request Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants