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;