Archived
1
0
Fork 0

Fixed spacing and set initial nullptr values

This commit is contained in:
Brandon Rozek 2018-09-27 23:34:06 -04:00
parent 0bc8eaa46c
commit bd66b4ad11
2 changed files with 5 additions and 5 deletions

View file

@ -196,7 +196,7 @@ struct Value* equals(struct Value* x, struct Value* y) {
std::cerr << "Error, cannot compare a string with another data type." << std::endl;
}
struct Value* ans;
struct Value* ans = nullptr;
// Destruct all four cases
if (x->type == LONG && y->type == LONG) {
@ -224,7 +224,7 @@ struct Value* not_equals(struct Value* x, struct Value* y) {
std::cerr << "Error, cannot compare a string with another data type." << std::endl;
}
struct Value* ans;
struct Value* ans= nullptr;
// Destruct all four cases
if (x->type == LONG && y->type == LONG) {

View file

@ -15,9 +15,9 @@ struct Variable* find_variable(struct Environment* env, std::string id) {
return element->id == id;
});
if (result != env->vars.end()) {
return *result;
}
if (result != env->vars.end()) {
return *result;
}
return nullptr;
}