From f8e9cc0fc559fc9de0c3196e38c609ab38373c92 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 4 Feb 2020 11:53:43 +0100 Subject: [PATCH] Scope: Vars() returns const reference No caller wants to modify the container. --- src/Scope.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Scope.h b/src/Scope.h index 7485347669..0cc70b7751 100644 --- a/src/Scope.h +++ b/src/Scope.h @@ -45,7 +45,7 @@ public: BroType* ReturnType() const { return return_type; } size_t Length() const { return local.size(); } - std::map& Vars() { return local; } + const std::map& Vars() { return local; } ID* GenerateTemporary(const char* name);