pass as reference
This commit is contained in:
parent
e0574837b6
commit
c95d7ec886
|
|
@ -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
|
||||
|
||||
|
|
|
|||
2
ml.cpp
2
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<std::string, MlValue>::const_iterator itr = defs.find(name);
|
||||
if (itr != defs.end())
|
||||
|
|
|
|||
2
ml.h
2
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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue