mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Fix const ilist_node::get{Prev,Next}Node() to actually compile. Picky, picky.
llvm-svn: 103723
This commit is contained in:
parent
ed8dd53c85
commit
10ef3afee3
@ -67,7 +67,7 @@ public:
|
||||
|
||||
/// \brief Get the previous node, or 0 for the list head.
|
||||
const NodeTy *getPrevNode() const {
|
||||
NodeTy *Prev = this->getPrev();
|
||||
const NodeTy *Prev = this->getPrev();
|
||||
|
||||
// Check for sentinel.
|
||||
if (!Prev->getNext())
|
||||
@ -89,7 +89,7 @@ public:
|
||||
|
||||
/// \brief Get the next node, or 0 for the list tail.
|
||||
const NodeTy *getNextNode() const {
|
||||
NodeTy *Next = getNext();
|
||||
const NodeTy *Next = getNext();
|
||||
|
||||
// Check for sentinel.
|
||||
if (!Next->getNext())
|
||||
|
@ -34,6 +34,11 @@ TEST(ilistTest, Basic) {
|
||||
EXPECT_EQ(2, List.back().Value);
|
||||
EXPECT_EQ(2, List.front().getNextNode()->Value);
|
||||
EXPECT_EQ(1, List.back().getPrevNode()->Value);
|
||||
|
||||
const ilist<Node> &ConstList = List;
|
||||
EXPECT_EQ(2, ConstList.back().Value);
|
||||
EXPECT_EQ(2, ConstList.front().getNextNode()->Value);
|
||||
EXPECT_EQ(1, ConstList.back().getPrevNode()->Value);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user