cleanup: string_view and cast cleanups for Google import.#5139
Merged
htuch merged 5 commits intoenvoyproxy:masterfrom Nov 28, 2018
Merged
cleanup: string_view and cast cleanups for Google import.#5139htuch merged 5 commits intoenvoyproxy:masterfrom
htuch merged 5 commits intoenvoyproxy:masterfrom
Conversation
This mostly relates to changes in how protobuf Status is handled, which will be reflected in future protobuf releases as well. * Replace a bunch of const std::string& with absl::string_view. * Static cast error_code() to uint64_t. Not needed in OSS today, but in the future this will be an enum class. Risk Level: Low Testing: bazel test //test/... Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Harvey Tuch <htuch@google.com>
lizan
previously approved these changes
Nov 28, 2018
| * Copy a string into the buffer. | ||
| * @param data supplies the string to copy. | ||
| */ | ||
| virtual void add(const std::string& data) PURE; |
Member
There was a problem hiding this comment.
I think we can remove add(const void* data, uint64_t size) variant with this, just leave a TODO?
Member
Author
There was a problem hiding this comment.
Yes, I'll add TODOs. Too many call sites for this PR to cleanup (> 100).
| * Set the header value by copying data into it. | ||
| */ | ||
| virtual void value(const std::string& value) PURE; | ||
| virtual void value(absl::string_view value) PURE; |
Member
There was a problem hiding this comment.
same here for value(const char* value, uint32_t size)
Signed-off-by: Harvey Tuch <htuch@google.com>
mattklein123
approved these changes
Nov 28, 2018
lizan
approved these changes
Nov 28, 2018
fredlas
pushed a commit
to fredlas/envoy
that referenced
this pull request
Mar 5, 2019
…#5139) This mostly relates to changes in how protobuf Status is handled, which will be reflected in future protobuf releases as well. * Replace a bunch of const std::string& with absl::string_view. * Static cast error_code() to uint64_t. Not needed in OSS today, but in the future this will be an enum class. Risk Level: Low Testing: bazel test //test/... Signed-off-by: Harvey Tuch <htuch@google.com> Signed-off-by: Fred Douglas <fredlas@google.com>
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.
This mostly relates to changes in how protobuf Status is handled, which
will be reflected in future protobuf releases as well.
Replace a bunch of const std::string& with absl::string_view.
Static cast error_code() to uint64_t. Not needed in OSS today, but in
the future this will be an enum class.
Risk Level: Low
Testing: bazel test //test/...
Signed-off-by: Harvey Tuch htuch@google.com