(list)+general style change, use unary switches for checking null

This commit is contained in:
2021-11-21 00:28:01 +00:00
parent ede2e8bfc0
commit 2f0fe5aef2

View File

@@ -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;