Add query parameter support to timeplus-cpp protocol#25
Merged
chenziliang merged 3 commits intotimeplus-io:masterfrom Jan 22, 2026
Merged
Add query parameter support to timeplus-cpp protocol#25chenziliang merged 3 commits intotimeplus-io:masterfrom
chenziliang merged 3 commits intotimeplus-io:masterfrom
Conversation
chenziliang
reviewed
Jan 22, 2026
timeplus/base/wire_format.cpp
Outdated
| inline const char* find_quoted_chars(const char* start, const char* end) | ||
| { | ||
| static constexpr char quoted_chars[] = {'\0', '\b', '\t', '\n', '\'', '\\'}; | ||
| const auto first = std::find_first_of(start, end, std::begin(quoted_chars), std::end(quoted_chars)); |
Contributor
There was a problem hiding this comment.
nit : const auto * first =
Contributor
Author
There was a problem hiding this comment.
std::find_first_of returns a const char* here, so const auto first = … already deduces the pointer type. I can switch to const char* first if you prefer explicitness, happy to update.
Contributor
There was a problem hiding this comment.
yes please, this is usually we do to make things explicit and easier to read
Contributor
Author
There was a problem hiding this comment.
chenziliang
reviewed
Jan 22, 2026
| return (first == end) ? nullptr : first; | ||
| } | ||
|
|
||
| void WireFormat::WriteQuotedString(OutputStream& output, std::string_view value) { |
Contributor
There was a problem hiding this comment.
If we could have some unit test to cover this function, it will be awesome
Contributor
Author
There was a problem hiding this comment.
chenziliang
approved these changes
Jan 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation:
Notes/Risks: