File tree Expand file tree Collapse file tree 2 files changed +19
-22
lines changed Expand file tree Collapse file tree 2 files changed +19
-22
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,25 @@ class Use {
84
84
Use **Prev = nullptr ;
85
85
User *Parent = nullptr ;
86
86
87
- inline void addToList (Use **List);
88
- inline void removeFromList ();
87
+ void addToList (Use **List) {
88
+ Next = *List;
89
+ if (Next)
90
+ Next->Prev = &Next;
91
+ Prev = List;
92
+ *Prev = this ;
93
+ }
94
+
95
+ void removeFromList () {
96
+ if (Prev) {
97
+ *Prev = Next;
98
+ if (Next) {
99
+ Next->Prev = Prev;
100
+ Next = nullptr ;
101
+ }
102
+
103
+ Prev = nullptr ;
104
+ }
105
+ }
89
106
};
90
107
91
108
// / Allow clients to treat uses just like values when using
Original file line number Diff line number Diff line change @@ -915,26 +915,6 @@ const Use &Use::operator=(const Use &RHS) {
915
915
return *this ;
916
916
}
917
917
918
- void Use::addToList (Use **List) {
919
- Next = *List;
920
- if (Next)
921
- Next->Prev = &Next;
922
- Prev = List;
923
- *Prev = this ;
924
- }
925
-
926
- void Use::removeFromList () {
927
- if (Prev) {
928
- *Prev = Next;
929
- if (Next) {
930
- Next->Prev = Prev;
931
- Next = nullptr ;
932
- }
933
-
934
- Prev = nullptr ;
935
- }
936
- }
937
-
938
918
template <class Compare > void Value::sortUseList (Compare Cmp) {
939
919
if (!UseList || !UseList->Next )
940
920
// No need to sort 0 or 1 uses.
You can’t perform that action at this time.
0 commit comments