diff --git a/Readme.md b/Readme.md index d39f20b..3dfecbf 100644 --- a/Readme.md +++ b/Readme.md @@ -37,7 +37,6 @@ - get-env, set-env; set-env cannot be implemented in stdlib.lsp, because popen is in fact subshell - format (sprintf) - setq -- mapcar (funcall, apply) - syntax highlighting do VS Code - add hash datatype diff --git a/ml.cpp b/ml.cpp index 565b289..3c2294d 100644 --- a/ml.cpp +++ b/ml.cpp @@ -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::const_iterator itr = defs.find(name); if (itr != defs.end()) diff --git a/ml.h b/ml.h index 257aa5a..f5e5cd0 100644 --- a/ml.h +++ b/ml.h @@ -34,7 +34,7 @@ public: // have this atom in scope? // This is only used to determine which atoms to capture when // creating a lambda function. - bool has(std::string name) const; + bool has(const std::string &name) const; // Get the value associated with this name in this scope MlValue get(const std::string &name) const;