const & parameter

This commit is contained in:
VaclavT 2021-02-22 01:25:49 +01:00
parent 2618f7b7ae
commit e84d63c138
2 changed files with 2 additions and 2 deletions

2
ml.cpp
View File

@ -644,7 +644,7 @@ std::ostream &operator<<(std::ostream &os, MlEnvironment const &e) {
return os << "}";
}
void MlEnvironment::set(std::string name, MlValue value) {
void MlEnvironment::set(const std::string &name, MlValue value) {
defs[name] = value;
}

2
ml.h
View File

@ -28,7 +28,7 @@ public:
MlValue get(const std::string &name) const;
// Set the value associated with this name in this scope
void set(std::string name, MlValue value);
void set(const std::string &name, MlValue value);
void combine(MlEnvironment const &other);