From 6799d16260d7678799e5386450f799ddb40fe6d2 Mon Sep 17 00:00:00 2001 From: wangbaiping Date: Tue, 1 Oct 2024 21:40:39 +0800 Subject: [PATCH] remove unnecessary checks Signed-off-by: wangbaiping --- source/common/formatter/stream_info_formatter.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/source/common/formatter/stream_info_formatter.cc b/source/common/formatter/stream_info_formatter.cc index ebec83b58bf6..5ff679a731fd 100644 --- a/source/common/formatter/stream_info_formatter.cc +++ b/source/common/formatter/stream_info_formatter.cc @@ -263,9 +263,6 @@ FilterStateFormatter::format(const StreamInfo::StreamInfo& stream_info) const { #endif } case FilterStateFormat::Field: { - if (!state->hasFieldSupport()) { - return absl::nullopt; - } auto field_value = state->getField(field_name_); auto string_value = absl::visit(StringFieldVisitor(), field_value); if (!string_value) { @@ -310,9 +307,6 @@ FilterStateFormatter::formatValue(const StreamInfo::StreamInfo& stream_info) con return SubstitutionFormatUtils::unspecifiedValue(); } case FilterStateFormat::Field: { - if (!state->hasFieldSupport()) { - return SubstitutionFormatUtils::unspecifiedValue(); - } auto field_value = state->getField(field_name_); auto string_value = absl::visit(StringFieldVisitor(), field_value); if (!string_value) {