aboutsummaryrefslogtreecommitdiff
path: root/list.cpp
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2021-11-21 00:28:01 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2021-11-21 00:28:01 +0000
commit2f0fe5aef269cbac8a5dc78ef3dd3a005f6ff2db (patch)
tree73af6f474da9bfc35f9d0b8fd72be691549aa921 /list.cpp
parentede2e8bfc0ae9263f57f6013ca379c89b93f36af (diff)
downloadalgorithms-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.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/list.cpp b/list.cpp
index 873dfe9..593a87e 100644
--- a/list.cpp
+++ b/list.cpp
@@ -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;