Skip to content

Commit

Permalink
preliminary PR to Porting Envoy to C++17 (envoyproxy#11840)
Browse files Browse the repository at this point in the history
This is the PR that does the setup work needed to fix some
incompatiblity issue with the current codebase and C++17.

This is a part of the draft PR envoyproxy#11570 that intends to
port Envoy to C++17, sans all the changes to build configurations.

Signed-off-by: Yifan Yang needyyang@google.com
  • Loading branch information
stedsome committed Jul 7, 2020
1 parent 5960533 commit 9ad964d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion source/common/formatter/substitution_formatter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ class StreamInfoDurationFieldExtractor : public StreamInfoFormatter::FieldExtrac
}

private:
absl::optional<uint32_t> extractMillis(const StreamInfo::StreamInfo& stream_info) const {
absl::optional<int64_t> extractMillis(const StreamInfo::StreamInfo& stream_info) const {
const auto time = field_extractor_(stream_info);
if (time) {
return std::chrono::duration_cast<std::chrono::milliseconds>(time.value()).count();
Expand Down
2 changes: 1 addition & 1 deletion source/common/grpc/google_async_client_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class GoogleAsyncStreamImpl : public RawAsyncStream,
// End-of-stream with no additional message.
PendingMessage() = default;

const absl::optional<grpc::ByteBuffer> buf_;
const absl::optional<grpc::ByteBuffer> buf_{};
const bool end_stream_{true};
};

Expand Down
2 changes: 1 addition & 1 deletion source/common/upstream/outlier_detection_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class DetectorHostMonitorNullImpl : public DetectorHostMonitor {
double successRate(SuccessRateMonitorType) const override { return -1; }

private:
const absl::optional<MonotonicTime> time_;
const absl::optional<MonotonicTime> time_{};
};

/**
Expand Down
1 change: 1 addition & 0 deletions source/extensions/common/aws/credentials_provider.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <memory>
#include <string>

#include "envoy/common/pure.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Http::FilterHeadersStatus Filter::encodeHeaders(Http::ResponseHeaderMap& headers
headers.setGrpcStatus(Envoy::Grpc::Status::WellKnownGrpcStatus::Unknown);
headers.setStatus(enumToInt(Http::Code::OK));

if (content_type != nullptr) {
if (!content_type.empty()) {
headers.setContentType(content_type_);
}

Expand Down
1 change: 1 addition & 0 deletions tools/type_whisperer/api_type_db.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <string>
#include <unordered_map>

#include "absl/strings/string_view.h"
Expand Down

0 comments on commit 9ad964d

Please sign in to comment.