diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2021-11-21 00:28:01 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2021-11-21 00:28:01 +0000 |
commit | 2f0fe5aef269cbac8a5dc78ef3dd3a005f6ff2db (patch) | |
tree | 73af6f474da9bfc35f9d0b8fd72be691549aa921 /list.cpp | |
parent | ede2e8bfc0ae9263f57f6013ca379c89b93f36af (diff) | |
download | algorithms-2f0fe5aef269cbac8a5dc78ef3dd3a005f6ff2db.tar.gz algorithms-2f0fe5aef269cbac8a5dc78ef3dd3a005f6ff2db.tar.bz2 algorithms-2f0fe5aef269cbac8a5dc78ef3dd3a005f6ff2db.zip |
(list)+general style change, use unary switches for checking null
Diffstat (limited to 'list.cpp')
-rw-r--r-- | list.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -45,7 +45,7 @@ List<T> *append(List<T> *lst, T value) template <typename T> std::ostream& operator<<(std::ostream& ostream, const List<T> *lst) { - if (lst == NULL) + if (!lst) return ostream; ostream << "|" << lst->value << lst->next; return ostream; |