From 4abeb5f8a6ad77b32496f3e8b20e1fd1b6f428fb Mon Sep 17 00:00:00 2001
From: Ferenc Szontágh <szf@fsociety.hu>
Date: Fri, 18 Apr 2025 07:54:40 +0000
Subject: [PATCH] function checking
---
src/Symbols/SymbolContainer.hpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/Symbols/SymbolContainer.hpp b/src/Symbols/SymbolContainer.hpp
index fc3fc5d..99f79b3 100644
--- a/src/Symbols/SymbolContainer.hpp
+++ b/src/Symbols/SymbolContainer.hpp
@@ -1,6 +1,7 @@
#ifndef SYMBOL_CONTAINER_HPP
#define SYMBOL_CONTAINER_HPP
+#include <iostream>
#include <memory>
#include <stdexcept>
#include <unordered_map>
@@ -33,7 +34,8 @@
}
void enter(const std::string & name) {
- if (scopes_.contains(name)) {
+ auto it = scopes_.find(name);
+ if (it != scopes_.end()) {
previousScope_ = currentScope_;
currentScope_ = name;
} else {
@@ -104,7 +106,7 @@
}
static std::string dump() {
- std::string result = "";
+ std::string result;
std::cout << "\n--- Defined Scopes ---" << '\n';
for (const auto & scope_name : instance()->getScopeNames()) {
--
Gitblit v1.9.3