From 320ba34e58d8f16becddf0db986c3d4e8885c3ad Mon Sep 17 00:00:00 2001 From: mooophy Date: Tue, 16 Dec 2014 23:41:37 +1300 Subject: [PATCH] fix bug : is_precedent modified: ../as1/assignment01_by_evan.cpp --- assignment1/as1/assignment01_by_evan.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assignment1/as1/assignment01_by_evan.cpp b/assignment1/as1/assignment01_by_evan.cpp index fe865b1..de0a0e4 100644 --- a/assignment1/as1/assignment01_by_evan.cpp +++ b/assignment1/as1/assignment01_by_evan.cpp @@ -38,7 +38,7 @@ inline bool is_same_position(Node const& lhs, Node const& rhs) template inline bool is_precedent(Node const& lhs, Node const& rhs) { - if(lhs.row_ < lhs.row_) return true; + if(lhs.row_ < rhs.row_) return true; else if (lhs.row_ == rhs.row_) return lhs.col_ < rhs.col_; else return false; } @@ -148,7 +148,7 @@ ostream& operator<<(ostream& os, Matrix const& mat) curr = curr->next_; } } - os<