pass as reference

This commit is contained in:
2021-04-14 07:55:33 +02:00
parent e0574837b6
commit c95d7ec886
3 changed files with 2 additions and 3 deletions

2
ml.cpp
View File

@@ -1768,7 +1768,7 @@ void load_std_lib(MlEnvironment &env) {
}
// Does this environment, or its parent environment, have a variable?
bool MlEnvironment::has(std::string name) const {
bool MlEnvironment::has(const std::string &name) const {
// Find the value in the map
std::map<std::string, MlValue>::const_iterator itr = defs.find(name);
if (itr != defs.end())