From ca4ec2ec4217062fd09ed4b5e3ddd42f5444cf17 Mon Sep 17 00:00:00 2001 From: Sofia Chernysheva Date: Thu, 6 Feb 2025 17:16:00 +0300 Subject: [PATCH] Simplify path_matcher.h --- src/include/grpc_transcoding/path_matcher.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/grpc_transcoding/path_matcher.h b/src/include/grpc_transcoding/path_matcher.h index 1c0f6fe..6f63c66 100644 --- a/src/include/grpc_transcoding/path_matcher.h +++ b/src/include/grpc_transcoding/path_matcher.h @@ -275,7 +275,7 @@ std::vector ExtractRequestParts( result = absl::StrSplit(path.substr(1), '/'); } // Removes all trailing empty parts caused by extra "/". - while (!result.empty() && (*(--result.end())).empty()) { + while (!result.empty() && result.back().empty()) { result.pop_back(); } return result;