Skip to content
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

signature of pb2json [etc]: why not const ref instead of const pointer? #14

Open
timotheecour opened this issue Jun 2, 2016 · 1 comment

Comments

@timotheecour
Copy link

why
void pb2json(const google::protobuf::Message* msg, std::string& str);
instead of:
void pb2json(const google::protobuf::Message& msg, std::string& str);

(or even:
void pb2json(const google::protobuf::Message& msg, std::string* str);
to make it clear str is being modified)

@yinqiwen
Copy link
Owner

yinqiwen commented Jun 2, 2016

yes, it is much better :)

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

No branches or pull requests

2 participants